Migrate off deprecated Vast.ai /api/v0/instances#4031
Merged
Conversation
- For testing the auth token, use
`/api/v1/instances`.
- For finding an instance by ID, use
`/api/v0/instances/{id}`. On the upside, this
allows to issue only one request for a specific
instance, as opposed to traversing paginated
`/api/vX/instances` responses. On the downside,
if multiple instances are being provisioned at
once, each instance will require separate
`/api/v0/instances/{id}` requests, without an
option to reuse cache between instances. This
can result in hitting rate limits in
`VastAICompute.update_provisioning_data`, which
`dstack` easily recovers from by retrying on the
next pipeline tick.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/api/v1/instances./api/v0/instances/{id}. On the upside, this allows to issue only one request for a specific instance, as opposed to traversing paginated/api/vX/instancesresponses. On the downside, if multiple instances are being provisioned at once, each instance will require separate/api/v0/instances/{id}requests, without an option to reuse cache between instances. This can result in hitting rate limits inVastAICompute.update_provisioning_data, whichdstackeasily recovers from by retrying on the next pipeline tick.This PR is an alternative to #3938