vast-ai / vast-python

Vast.ai python and cli api client
MIT License
117 stars 44 forks source link

CLI search for cpu_ram seems bugged #54

Closed Brodski closed 5 months ago

Brodski commented 1 year ago

Hi all,

Sorry to bring this up again but this bug still seems to exist. As you can see in the screenshot I make one query, then another query with cpu_ram > 16 and returns less than expected results.

Query 1: python .\vast search offers --order=cpu_ram --on-demand 'dph < 0.12 cuda_vers >= 12 Query 2: python .\vast search offers --order=cpu_ram --on-demand 'dph < 0.12 cuda_vers >= 12 cpu_ram > 16'

As you can see, the green boxes highlight 5 other instances that I would expect to be shown in query 2 but for some reason does not :(

image

I fiddled around with the vast.py file and added a few print() statements to search__offers() and it looks like a server side problem, as the response from a query like the below returns the 'bad' response data:

url=https://console.vast.ai/api/v0/bundles?q=%7B%22verified%22%3A+%7B%22eq%22%3A+true%7D%2C+%22external%22%3A+%7B%22eq%22%3A+false%7D%2C+%22rentable%22%3A+%7B%22eq%22%3A+true%7D%2C+%22dph%22%3A+%7B%22lt%22%3A+%220.12%22%7D%2C+%22dph_total%22%3A+%7B%22lt%22%3A+%220.12%22%7D%2C+%22cuda_vers%22%3A+%7B%22gte%22%3A+%2212%22%7D%2C+%22cuda_max_good%22%3A+%7B%22gte%22%3A+%2212%22%7D%2C+%22cpu_ram%22%3A+%7B%22gt%22%3A+16000.0%7D%2C+%22order%22%3A+%5B%5B%22dph_total%22%2C+%22asc%22%5D%5D%2C+%22type%22%3A+%22on-demand%22%7D&api_key=<OMITED API KEY!> image

(I added a few arguments to the query to shorten it, for all I know other search fields are bugged)

jsbcannell commented 9 months ago

This was fixed at some point, but I don't believe --order=cpu_ram is actually supported:

image

Brodski commented 5 months ago

thanks, I have confirmed it's fixed. 👍