Skip to content

Commit

Permalink
[k8s] Fix show-gpus availability map when nvidia drivers are not in…
Browse files Browse the repository at this point in the history
…stalled (#4429)

* Fix availability map

* Fix availability map
  • Loading branch information
romilbhardwaj authored Dec 3, 2024
1 parent 5c1cb9c commit 747382a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sky/clouds/service_catalog/kubernetes_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,12 @@ def _list_accelerators(

accelerators_available = accelerator_count - allocated_qty

if accelerator_name not in total_accelerators_available:
total_accelerators_available[accelerator_name] = 0
if accelerators_available >= min_quantity_filter:
quantized_availability = min_quantity_filter * (
accelerators_available // min_quantity_filter)
total_accelerators_available[
accelerator_name] += quantized_availability
total_accelerators_available[accelerator_name] = (
total_accelerators_available.get(accelerator_name, 0) +
quantized_availability)

result = []

Expand Down

0 comments on commit 747382a

Please sign in to comment.