Skip to content

[Bug]: Vast.ai offers not sorted by score in dstack offer --fleet #3896

@jvstme

Description

@jvstme

Steps to reproduce

dstack offer --backend vastai --fleet default --max-offers 10

Actual behaviour

Offers are sorted by price.

$ dstack offer --backend vastai --fleet default --max-offers 10                        

 #   BACKEND                 RESOURCES                                        INSTANCE TYPE  PRICE     
 1   vastai (pl-poland)      cpu=6 mem=8GB disk=100GB gpu=A2000:12GB:1        31009673       $0.0692   
 2   vastai (us-oklahoma)    cpu=8 mem=8GB disk=100GB gpu=RTX3070:8GB:1       32711684       $0.0944   
 3   vastai (jp-japan)       cpu=8 mem=32GB disk=100GB gpu=A4000:16GB:1       35956299       $0.1347   
 4   vastai (us-oklahoma)    cpu=16 mem=32GB disk=100GB gpu=RTX3070:8GB:2     32711686       $0.1611   
 5   vastai (jp-japan)       cpu=16 mem=128GB disk=100GB gpu=A4000:16GB:2     36339687       $0.236    
 6   vastai (us-texas)       cpu=21 mem=28GB disk=100GB gpu=RTX5060Ti:16GB:1  29276169       $0.2944   
 7   vastai (us-california)  cpu=20 mem=12GB disk=100GB gpu=RTX3090:24GB:2    37123433       $0.4404   
 8   vastai (es-spain)       cpu=24 mem=8GB disk=100GB gpu=RTX3090:24GB:1     28889468       $0.5315   
 9   vastai (us-texas)       cpu=32 mem=63GB disk=100GB gpu=RTX4060Ti:16GB:2  37119318       $0.5704   
 10  vastai (dk-denmark)     cpu=24 mem=31GB disk=100GB gpu=RTX5080:16GB:1    36820600       $0.5704   
     ...                                                                                               
 Shown 10 of 58 offers, $17.60583max

Expected behaviour

Offers are sorted by score, the same way they are already sorted in apply plans and in dstack offer without --fleet.

$ dstack offer --backend vastai --max-offers 10

 #   BACKEND               RESOURCES                                           INSTANCE TYPE  PRICE     
 1   vastai (pl-poland)    cpu=96 mem=96GB disk=100GB gpu=RTXPRO6000WS:96GB:2  31132151       $2.5727   
 2   vastai (pl-poland)    cpu=48 mem=24GB disk=100GB gpu=RTXPRO6000WS:96GB:1  31132148       $1.3234   
 3   vastai (bg-bulgaria)  cpu=64 mem=24GB disk=100GB gpu=RTXPRO6000S:96GB:1   36074640       $1.3704   
 4   vastai (us-oregon)    cpu=48 mem=127GB disk=100GB gpu=B200:180GB:2        36081031       $8.2062   
 5   vastai (us-)          cpu=96 mem=32GB disk=100GB gpu=RTXPRO5000:48GB:2    36185256       $1.8585   
 6   vastai (cn-)          cpu=20 mem=12GB disk=100GB gpu=RTX3090:24GB:1       34058281       $0.1611   
 7   vastai (bg-bulgaria)  cpu=28 mem=24GB disk=100GB gpu=H100NVL:94GB:1       24548931       $2.1889   
 8   vastai (us-texas)     cpu=16 mem=12GB disk=100GB gpu=RTX5090:32GB:1       36268723       $1.113    
 9   vastai (us-)          cpu=192 mem=128GB disk=100GB gpu=RTXPRO5000:48GB:4  36185261       $3.6985   
 10  vastai (cz-czechia)   cpu=16 mem=8GB disk=100GB gpu=RTXPRO5000:48GB:1     35820445       $0.9611   
     ...                                                                                                
 Shown 10 of 59 offers, $15.92388max

dstack version

0.20.20

Server logs

Additional information

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions