dstack
dstack copied to clipboard
[Feature]: Select the best available offer in terms of compute/price
Problem
dstack apparently does not select the best offer available in terms of compute resources and price.
Consider the partial config below:
...
resources:
gpu: A5000:24GB:1
memory: 30GB..
cpu: 8..
disk: 20GB..
And the offers:
# BACKEND RESOURCES INSTANCE TYPE PRICE
1 runpod (FR) cpu=8 mem=45GB disk=20GB A5000:24GB:1 NVIDIA RTX A5000 $0.16
2 runpod (US) cpu=12 mem=125GB disk=20GB A5000:24GB:1 NVIDIA RTX A5000 $0.16
3 runpod (CA-MTL-1) cpu=9 mem=50GB disk=20GB A5000:24GB:1 NVIDIA RTX A5000 $0.27
...
Shown 3 of 4 offers, $0.27max
1 and 2 have the same price but 2 is has higher CPU core count and more RAM available, however, 1 is chosen.
Solution
dstack should choose the best available offer, in terms of price and compute. For the example above, 2 would be the best choice.
Workaround
As suggested by Andrey in discord, using more specific constraints to choose that offer. However, this still depends on availability on the backend.
For the above example this would be --cpu=12, --memory=125GB or both of these.
Would you like to help us implement this feature by sending a PR?
No