-
Notifications
You must be signed in to change notification settings - Fork 6
feat: support specific GPU ids in serverless resource config #143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support specific GPU ids in serverless resource config #143
Conversation
…pu-by-name-in-gpuids
…in-gpuids' of https://github.com/runpod/tetra-rp into zeke/ae-567-tetra-ability-to-pick-specific-gpu-by-name-in-gpuids
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for specifying individual GPU IDs in serverless resource configurations, allowing mixed usage of GPU groups and specific GPU types. The changes enable GPU pool expansion/contraction and handle GPU ID negations in the API.
Changes:
- Introduced
GpuTypeenum and renamedGpuTypemodel toGpuTypeModelto avoid naming conflicts - Added
to_gpu_ids_str()andfrom_gpu_ids_str()methods to convert between GPU configurations and API format - Updated
ServerlessResourceto accept bothGpuGroupandGpuTypein thegpusfield
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/tetra_rp/core/resources/gpu.py | Added GpuType enum, renamed model to GpuTypeModel, implemented GPU ID conversion logic with pool mappings |
| src/tetra_rp/core/resources/serverless.py | Updated gpus field type and validator to support mixed GPU groups/types, refactored GPU synchronization to use new conversion methods |
| src/tetra_rp/core/resources/utils.py | Updated type annotation from GpuType to GpuTypeModel |
| tests/unit/resources/test_gpu_ids.py | Added tests for GPU ID conversion methods and import validation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…pu-by-name-in-gpuids
…pu-by-name-in-gpuids
This PR adds the logic to expand and contract GPU pools into individual GPU IDs, and take into account GPU ID negations when defining serverless resource configs.
This also allows resources to be defined using any combination of GPU pool and GPU type enums. For example: