Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support users to set more fields in suggetion deployment #1737

Open
tingweiwu opened this issue Nov 19, 2021 · 12 comments · Fixed by #2000
Open

Support users to set more fields in suggetion deployment #1737

tingweiwu opened this issue Nov 19, 2021 · 12 comments · Fixed by #2000

Comments

@tingweiwu
Copy link

/kind feature

Describe the solution you'd like
[A clear and concise description of what you want to happen.]

Is it possible to allow users to set more fields in suggetion deployment like we set the trailSpec
such as imagePullSecrets 、args、command and so on

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

@gaocegege
Copy link
Member

I think it is a useful feature. WDYT @kubeflow/wg-automl-leads

@andreyvelich
Copy link
Member

Thank you for creating this @tingweiwu!
We can allow to specify the Deployment spec or spec.template.spec in Config Suggestion Settings, but then setting just Suggestion image will be more complicated for our users since they have to follow the correct API structure.
For example:

"random": {
  "containers": [
    {
      "image": "docker.io/andreyvelichkevich/suggestion-chocolate:latest"
    }
  ]
 },

Does it look good to us @gaocegege @johnugeorge @tingweiwu ?

@tingweiwu
Copy link
Author

tingweiwu commented Nov 27, 2021

It seems the Suggestion settings with configmap don't support imagePullSecrets and other similar spec settings in Deployment

It will probably be more flexible for user to set deployment attributes in algorithmSpec template in different scenarios.
two simple examples as the following
case 1: set imagePullSecrets and resource limits

apiVersion: kubeflow.org/v1beta1
kind: Experiment
metadata:
  namespace: kubeflow-test
  name: job-test
spec:
    algorithm:
      algorithmName: random
      algorithmSpec:
        template:
          spec:
            containers:
            - image: docker.io/kubeflowkatib/suggestion-hyperopt:latest
              resources:
                limits:
                  cpu: 500m
                  ephemeral-storage: 5Gi
                  memory: 100Mi
                requests:
                  cpu: 50m
                  ephemeral-storage: 500Mi
                  memory: 10Mi 
            imagePullSecrets:
            - name: default-secret  
                 

case 2: set start commond and persistent volume, as the new suggetion service may not build in image.

apiVersion: kubeflow.org/v1beta1
kind: Experiment
metadata:
  namespace: kubeflow-test
  name: job-test
spec:
    algorithm:
      algorithmName: random
      algorithmSpec:
        template:
          spec:
            containers:
            - image: docker.io/kubeflowkatib/suggestion-new:latest
              args:
              - python /opt/apps/main.py 
              command:
              - /bin/bash
              - -c
              volumeMounts:
                - mountPath: /opt/apps
                  name: kubeflow-test-pvc
                  readOnly: true
            imagePullSecrets:
            - name: default-secret  
            volumes:
            - name: kubeflow-test-pvc
              persistentVolumeClaim:
                claimName: kubeflow-test-pvc

@gaocegege
Copy link
Member

I think we should consider if we can support SuggestionSpec as @tingweiwu said. WDYT @andreyvelich

@andreyvelich
Copy link
Member

Basically, Katib config was designed to simplify Experiment specification and give additional settings to more advanced users who are Kubernetes experts.
Therefore, I am not sure that algorithmSpec should live under Experiment, but we can extend Katib config settings as I mentioned above: #1737 (comment).

What do you think @johnugeorge ?

@andreyvelich
Copy link
Member

/priority p2
/help

@google-oss-prow
Copy link

@andreyvelich:
This request has been marked as needing help from a contributor.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

/priority p2
/help

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@johnugeorge
Copy link
Member

I think, this is a valid ask for many deployments. We can provide this as an option. If AlgorithmSpec is provided in Experiment, it is picked up. Else, defaults will be used(like the current)

@ramdootp
Copy link

@andreyvelich @johnugeorge would need this feature for our deployments. which katib release will have this feature implemented?

@andreyvelich
Copy link
Member

This hasn't been implemented fully yet.

@andreyvelich andreyvelich reopened this Jan 23, 2024
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@andreyvelich
Copy link
Member

/lifecycle frozen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants