Conversation
e966c19 to
6dfe0be
Compare
|
Claude finished @olivermeyer's task in 2m 10s —— View job PR Review: Use GPUConfig in E2E tests ✅I've completed a comprehensive review of this PR. The changes are well-designed and correct - they properly address the issue from PR #391 by using the SummaryWhat changed: The Why this matters: PR #391 added Review Status: ✅ APPROVED - No blocking issues found Critical Checks - All Passed ✅1. Test Markers ✅All tests in this file have proper # Verified all tests are properly marked
$ uv run pytest tests/aignostics/platform/e2e_test.py --collect-only
collected 7 items (all have e2e marker)2. Code Quality ✅
3. Commit Message ✅Follows conventional commits: Technical AnalysisWhat the change does:Before (manual dict construction): custom_metadata = {
"sdk": {
"pipeline": {
"gpu": {
"gpu_type": PIPELINE_GPU_TYPE,
"provisioning_mode": PIPELINE_GPU_PROVISIONING_MODE,
"flex_start_max_run_duration_minutes": PIPELINE_GPU_FLEX_START_MAX_RUN_DURATION_MINUTES, # ⚠️ Always included, even if None
"max_gpus_per_slide": PIPELINE_MAX_GPUS_PER_SLIDE,
},
# ...
}
}
}After (using GPUConfig): gpu_config = GPUConfig(
gpu_type=PIPELINE_GPU_TYPE,
provisioning_mode=PIPELINE_GPU_PROVISIONING_MODE,
max_gpus_per_slide=PIPELINE_MAX_GPUS_PER_SLIDE,
flex_start_max_run_duration_minutes=PIPELINE_GPU_FLEX_START_MAX_RUN_DURATION_MINUTES,
)
custom_metadata = {
"sdk": {
"pipeline": {
"gpu": gpu_config.model_dump(), # ✅ Excludes None values via exclude_if
# ...
}
}
}Why this is correct:
Observations & Recommendations✅ Strengths
|
|
Audit workflow failing because of vulnerabilities, will be addressed separately. |
There was a problem hiding this comment.
Pull request overview
This PR updates E2E tests to use the GPUConfig class for constructing GPU configuration metadata instead of manually building dictionaries. This ensures proper serialization behavior where flex_start_max_run_duration_minutes is excluded from the output when its value is None, aligning with changes introduced in PR #391.
Changes:
- Import
GPUConfigfromaignostics.platform._sdk_metadata - Instantiate
GPUConfigwith test constants for GPU configuration - Use
GPUConfig.model_dump()to serialize GPU config in custom metadata
| custom_metadata=custom_metadata, | ||
| ) | ||
|
|
||
| # Let's validate we can fiond the run by id |
There was a problem hiding this comment.
There is a typo in the comment: "fiond" should be "find".
| # Let's validate we can fiond the run by id | |
| # Let's validate we can find the run by id |
Codecov Report✅ All modified and coverable lines are covered by tests. |
|



In #391 we excluded
flex_start_max_run_duration_minutesfrom the serialized representation ofGPUConfigif it'sNone. In some E2E tests we bypass that class and construct thecustom_metadatadict manually. This PR fixes that by using theGPUConfigclass.I'm not switching the entire metadata dict to the
RunSdkMetadatato avoid making this change larger than necessary, to get the tests to pass again ASAP.