Skip to content

Commit

Permalink
Vast: adding a cardinality cutoff to the instance list generation
Browse files Browse the repository at this point in the history
  • Loading branch information
kristopolous committed Feb 3, 2025
1 parent 9d1931d commit cf23e1b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions sky/clouds/service_catalog/data_fetchers/fetch_vast.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,11 @@ def dot_get(d: dict, key: str) -> Any:
maxBid = max([x.get('SpotPrice') for x in toList])
for instance in toList:
stub = f'{instance["InstanceType"]} {instance["Region"][-2:]}'
if stub not in seen:
instance['SpotPrice'] = '{:.2f}'.format(maxBid)
writer.writerow(instance)
if stub in seen:
printstub = f'{stub}#print'
if printstub not in seen:
instance['SpotPrice'] = f'{maxBid:.2f}'
writer.writerow(instance)
seen.add(printstub)
else:
seen.add(stub)

0 comments on commit cf23e1b

Please sign in to comment.