Skip to content

Commit

Permalink
[Kubernetes] Fix kubernetes available GPUs (#3631)
Browse files Browse the repository at this point in the history
Fix kubernetes available GPUs
  • Loading branch information
Michaelvll authored Jun 5, 2024
1 parent 7692eaa commit 7a6df2f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions sky/clouds/service_catalog/kubernetes_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,13 @@ def list_accelerators_realtime(
total_accelerators_capacity[
accelerator_name] += quantized_count

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)
if accelerator_name not in total_accelerators_available:
total_accelerators_available[
accelerator_name] = quantized_availability
else:
total_accelerators_available[
accelerator_name] += quantized_availability
total_accelerators_available[
accelerator_name] += quantized_availability

result = []

Expand Down

0 comments on commit 7a6df2f

Please sign in to comment.