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

Unable to configure the number of GPUs in the Jupyter Notebook UI #36

Open
camille-rodriguez opened this issue Jun 20, 2022 · 9 comments
Labels
enhancement New feature or request Kubeflow 1.7 This issue affects the Charmed Kubeflow 1.7 release

Comments

@camille-rodriguez
Copy link

camille-rodriguez commented Jun 20, 2022

It would be beneficial to be able to modify the Jupyter configmap to allow users to request even numbers of GPUs in the Jupyter notebook UI. This is controlled by the jupyter configmap “jupyter-ui-config-config”’s spawner_ui_config.yaml key.
Changing it manually does not seem to get overwritten by Juju.
Restarted the pod after applying the change and the change is still in place.
$ kubectl edit cm -n kubeflow jupyter-ui-config-config
$ kubectl delete pod -n kubeflow jupyter-ui-589594dd59-c6j26

@ca-scribner
Copy link
Contributor

This is at minimum a feature request (add this as config for the jupyter-notebooks charm), but might also be a bug upstream if it isn't reading the value properly.

@ca-scribner ca-scribner transferred this issue from canonical/bundle-kubeflow Jun 23, 2022
@ca-scribner ca-scribner added the enhancement New feature or request label Jun 23, 2022
@ca-scribner
Copy link
Contributor

Looking back at this, this might just be an easy spawner config change. The comments aren't completely clear, but I think this might be where we can configure the gpus? I wonder if our current setup is just the default, but that we can override it here

@gaure
Copy link

gaure commented Feb 28, 2023

Hi ca-scribner,
Apologies for not commenting here earlier.
The "spawner config" yaml file line 115 when uncommented supposes to be read by the UI, and used to display the number of GPUs options in the drop down list, but it is not working.
Does not matter if you uncomment it (by default is commented out) and change its values, the UI always display the defaults.
It seems the UI reads the membership of the "Number of GPUs" dropdown list from somewhere else, or the membership is passed statically when the UI is compile, and can't be changed dynamically.
Not sure which one of the above statements is correct, and if none is it, then why uncommenting the line 115 does not work?
Thanks!

@DnPlas DnPlas added the Kubeflow 1.7 This issue affects the Charmed Kubeflow 1.7 release label Mar 7, 2023
@NohaIhab
Copy link
Contributor

NohaIhab commented Mar 7, 2023

Hi! Screenshots from pre-release testing of 1.7
Screenshot from 2023-03-07 16-17-46
Screenshot from 2023-03-07 16-18-20
Does that resolve your issue? @camille-rodriguez

@narindergupta
Copy link

It is same in 1.6. Also it was mentioned you should be able to choose from 1-8 not only 1,2,4,8. It should be 1,2,3,4,5,6,7,8 as in NVIDIA GPU you can define make GPU available 1-8 any number.

@DnPlas DnPlas closed this as completed Mar 10, 2023
@DnPlas DnPlas reopened this Mar 10, 2023
@i-chvets
Copy link
Contributor

i-chvets commented Mar 15, 2023

Looks like number of GPUs is also specified in frontend:
kubeflow/components/crud-web-apps/jupyter/frontend/src/app/pages/form/form-new/form-gpus/form-gpus.component.ts:21
Values are not being passed from spawner config YAML to the frontend and it uses defaults.
That's where it is being utilized (default list from Typescript):
kubeflow/components/crud-web-apps/jupyter/frontend/src/app/pages/form/form-new/form-gpus/form-gpus.component.html:8

@i-chvets
Copy link
Contributor

i-chvets commented Mar 15, 2023

Possible solution is to uncomment and change this line in spawner_ui_config.yaml:

@@ -113,8 +113,8 @@ spawnerFormDefaults:
   gpus:
     # Number of GPUs to be assigned to the Notebook Container
     value:
-      # values: "none", "1", "2", "4", "8"
+      values: "none", "1", "2", "3", "4", "5", "6", "7", "8"
       num: "none"
       # Determines what the UI will show and send to the backend
       vendors:
       - limitsKey: "nvidia.com/gpu"

And change HTML in upstream:

kubeflow/components/crud-web-apps/jupyter/frontend/src/app/pages/form/form-new/form-gpus/form-gpus.component.html
@@ -5,7 +5,7 @@
       <mat-label i18n>Number of GPUs</mat-label>
       <mat-select matNativeControl formControlName="num">
         <mat-option value="none" i18n="option None">None</mat-option>
-        <mat-option *ngFor="let v of gpusCount" [value]="v">
+        <mat-option *ngFor="let v of values" [value]="v">
           {{ v }}
         </mat-option>
       </mat-select>

We need someone proficient in frontend to take a look.

@i-chvets
Copy link
Contributor

Tried the change suggested in PR. The change did not solve the issue. See testing instructions in the PR.
Looks like upstream needs to be fixed.

@kimwnasptd
Copy link
Contributor

Hey folks, indeed it's as @i-chvets mentioned. This is a missing feature in upstream itself.

Once kubeflow/kubeflow#6550 or kubeflow/kubeflow#7124 gets merged into upstream, most probably in upstream KF 1.8, then we'll also get these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Kubeflow 1.7 This issue affects the Charmed Kubeflow 1.7 release
Projects
None yet
Development

No branches or pull requests

8 participants