You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that the vastai_sdk library exists but is not mentioned in the Vast.ai documentation. I tried using it, but I couldn't find any documentation on how to properly format queries for the search_offers method.
Steps to Reproduce
Install the Vast.ai Python SDK:
pip install vastai_sdk
Run the following code:
importvastai_sdkv=vastai_sdk.VastAI(api_key='')
print(v.search_offers(query='...', limit=1)) # No documentation for query format
There is no clear documentation on how to structure the query parameter.
Expected Behavior
The documentation should include details on vastai_sdk and the correct query format for search_offers().
Additional Context
The official documentation only mentions vastai, but vastai_sdk is available.
There is no example or explanation for the query language used in search_offers().
Could you please provide documentation or examples on how to correctly format queries for search_offers()?
Thanks! 🚀
The text was updated successfully, but these errors were encountered:
>>> import vastai_sdk
>>> n=vastai_sdk.VastAI()
>>> help(n.search_offers)
Help on method search_offers in module vastai_sdk.vastai_sdk:
search_offers(query: Any = None, *, type: Any = 'on-demand', no_default: Any = False, new: Any = False, limit: int = None, disable_bundling: Any = False, storage: float = 5.0, order: str = 'score-') method of vastai_sdk.vastai_sdk.VastAI instance
Creates a query based on search parameters as in the examples above.
Query syntax:
query = comparison comparison...
comparison = field op value
field = <name of a field>
op = one of: <, <=, ==, !=, >=, >, in, notin
value = <bool, int, float, string> | 'any' | [value0, value1, ...]
bool: True, False
note: to pass '>' and '<' on the command line, make sure to use quotes
note: to encode a string query value (ie for gpu_name), replace any spaces ' ' with underscore '_'
Args:
query (Any): Query to search for. default: 'external=false rentable=true verified=true', pass -n to ignore default
type (Any): Show 'on-demand', 'reserved', or 'bid'(interruptible) pricing. default: on-demand
Default is on-demand.
no_default (Any): Disable default query
Default is False.
new (Any): New search exp
Default is False.
limit (int): No description
disable_bundling (Any): Deprecated
Default is False.
storage (float): Amount of storage to use for pricing, in GiB. default=5.0GiB
Default is 5.0.
order (str): Comma-separated list of fields to sort on. postfix field with - to sort desc. ex: -o 'num_gpus,total_flops-'. default='score-'
Default is score-.
I found that the
vastai_sdk
library exists but is not mentioned in the Vast.ai documentation. I tried using it, but I couldn't find any documentation on how to properly format queries for thesearch_offers
method.Steps to Reproduce
query
parameter.Expected Behavior
The documentation should include details on
vastai_sdk
and the correct query format forsearch_offers()
.Additional Context
vastai
, butvastai_sdk
is available.search_offers()
.Could you please provide documentation or examples on how to correctly format queries for
search_offers()
?Thanks! 🚀
The text was updated successfully, but these errors were encountered: