-
Notifications
You must be signed in to change notification settings - Fork 56
Update GPU shapes index with additional shapes and CPU parameters #1257
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
Conversation
…rresponding CPU parameters.
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.
Here are some potential issues found in the pull request changes:
-
ads/aqua/common/entities.py:
-
The
ComputeRank
andGPUSpecs
models now useOptional[int]
for fields that were previously justint
. If any downstream code assumes these fields are always set (non-None), it could cause runtime errors or unexpected behavior. -
The validator method in
ComputeShapeSummary
was renamed fromset_gpu_specs
topopulate_gpu_specs
, which is good for clarity, but make sure all references are updated elsewhere. -
There is a code comment referencing extracting GPU count with regex for shape names like "VM.GPU3.2", but the regex used is
r"\.(\d+)$"
—this will not match "VM.GPU3.2" but will match "VM.GPU.A10.2" (dot before number at end). If you expect both formats, this may miss certain shapes. -
Logging inside the validator uses
logger.debug
, but iflogger
is not defined or imported, this will cause a NameError.
-
-
ads/aqua/resources/gpu_shapes_index.json:
-
The JSON structure now includes new top-level items like
"BM.GPU.B200.8"
and"BM.GPU.GB200.4"
outside the"shapes"
object. This breaks the previous schema, where all shapes were inside the"shapes"
key. Downstream code expecting all shapes under"shapes"
will miss the new entries. -
The new shapes and CPU fields are comprehensive, but check that clients or code loading this file are updated to handle the new structure and that it won’t break existing deployments.
-
Summary:
- There are potential compatibility issues with both the Python and JSON changes.
- Make sure all code that reads or validates this data is aware of the new schema and field behaviors.
- Double-check shape name parsing and logger definitions.
) | ||
|
||
@model_validator(mode="after") | ||
@classmethod | ||
def set_gpu_specs(cls, model: "ComputeShapeSummary") -> "ComputeShapeSummary": | ||
def populate_gpu_specs(cls, model: "ComputeShapeSummary") -> "ComputeShapeSummary": |
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.
nit: I'm assuming this name change would not affect elsewhere since I didn't come across any references/usage within ads.
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.
Correct, this is just a validator, will not affect the final logic.
Description
This PR updates the GPU shapes index file to:
Motivation
Keeping the GPU shapes index up to date ensures accurate configuration and compatibility across deployments. Adding CPU parameters provides more complete resource specifications for better validation and deployment planning.