fix(VastAICompute): filter region before offer #3193
Merged
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.
Adds a filter for VastAI offers by config.regions, which uses
jp-japanfor example. At the moment, most provider computes pass locations=self.config.regions to pre-filter (AWS, Azure, GCP, OCI, Vultr, Runpod, Lambda, DigitalOcean, Cudo, etc.). Because the server later filters regions by exact equality to offer.region, region constraints still worked if you used the provider’s slug (e.g., jp-japan).Essentially with this addition, the backend pre-filters by exact location slug early; which means fewer items processed.
PS: I'm thinking that there could be some kind of abstraction in the future that groups offers automatically. For us, picking inference within a certain region really matters for latency. We want to have our application's compute as close as possible to our GPU workloads to reduce latency.
Testing internally at the moment, marked as draft.