Skip to content

Conversation

@KAJdev
Copy link
Contributor

@KAJdev KAJdev commented Jan 14, 2026

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:

config = LiveServerless(
    gpus=[GpuType.NVIDIA_H200, GpuGroup.AMPERE_80] # H200s and A100s
)

@KAJdev KAJdev requested a review from deanq January 14, 2026 22:43
@deanq deanq requested a review from Copilot January 23, 2026 12:28
Copy link
Contributor

Copilot AI left a 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 GpuType enum and renamed GpuType model to GpuTypeModel to avoid naming conflicts
  • Added to_gpu_ids_str() and from_gpu_ids_str() methods to convert between GPU configurations and API format
  • Updated ServerlessResource to accept both GpuGroup and GpuType in the gpus field

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.

@KAJdev KAJdev merged commit 86fde45 into main Jan 29, 2026
7 checks passed
@KAJdev KAJdev deleted the zeke/ae-567-tetra-ability-to-pick-specific-gpu-by-name-in-gpuids branch January 29, 2026 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants