fix: add variant-groups.ndjson to skip check for models#1191
fix: add variant-groups.ndjson to skip check for models#1191dbasunag merged 4 commits intoopendatahub-io:mainfrom
Conversation
|
The following are automatically added/executed:
Available user actions:
Supported labels{'/hold', '/verified', '/build-push-pr-image', '/wip', '/lgtm', '/cherry-pick'} |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughBroadened the skip condition in a test helper so Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tests/model_registry/model_catalog/search/utils.py (1)
350-353:⚠️ Potential issue | 🟠 MajorBug: in-place list mutation affects subsequent model iterations.
required_files.remove()mutates the list shared across all models within the same provider. IfMistral-Small-24B-Instruct-2501is processed first,evaluations.ndjsonis removed fromrequired_filesand subsequent models in the same provider won't be validated for that file.🐛 Proposed fix: copy the list per model iteration
for model in models.splitlines(): if model == "provider.json": continue + # Copy to avoid mutation affecting subsequent models + model_required_files = required_files.copy() # Remove data for specific RH models based on # https://redhat-internal.slack.com/archives/C09570S9VV0/p1762164394782969?thread_ts=1761834621.645019&cid=C09570S9VV0 if model == "Mistral-Small-24B-Instruct-2501": - required_files.remove("evaluations.ndjson") + model_required_files.remove("evaluations.ndjson") elif model == "granite-3.1-8b-instruct-quantized.w8a8": - required_files.remove("performance.ndjson") + model_required_files.remove("performance.ndjson") result = model_catalog_pod.execute( container=CATALOG_CONTAINER, command=["ls", f"{PERFORMANCE_DATA_DIR}/{provider}/{model}"] ) # Check which required files are missing - missing_files = [f for f in required_files if f not in result] + missing_files = [f for f in model_required_files if f not in result]🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/model_registry/model_catalog/search/utils.py` around lines 350 - 353, The current code mutates the shared required_files list (via required_files.remove(...)) when handling specific models, causing later models in the same provider to see a modified list; instead, create a per-model copy of required_files at the start of the model-processing loop (e.g., model_required = list(required_files) or required_files.copy()) and perform the conditional removals against that copy (the branches referencing model == "Mistral-Small-24B-Instruct-2501" and model == "granite-3.1-8b-instruct-quantized.w8a8" should update model_required rather than required_files) so each model is validated independently.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@tests/model_registry/model_catalog/search/utils.py`:
- Around line 350-353: The current code mutates the shared required_files list
(via required_files.remove(...)) when handling specific models, causing later
models in the same provider to see a modified list; instead, create a per-model
copy of required_files at the start of the model-processing loop (e.g.,
model_required = list(required_files) or required_files.copy()) and perform the
conditional removals against that copy (the branches referencing model ==
"Mistral-Small-24B-Instruct-2501" and model ==
"granite-3.1-8b-instruct-quantized.w8a8" should update model_required rather
than required_files) so each model is validated independently.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 11079fc1-9044-4b96-8f45-d5f4049d9bd8
📒 Files selected for processing (1)
tests/model_registry/model_catalog/search/utils.py
|
Status of building tag latest: success. |
Pull Request
Summary
Related Issues
How it has been tested
Additional Requirements
Summary by CodeRabbit