Feat/training report metadata - #992
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR defines a unified training report schema, adds configuration provenance to test scenarios, enriches training report parsing, and replaces strategy-based reporting with multi-run ChangesTraining report pipeline
Estimated code review effort: 4 (Complex) | ~45 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/cloudai/report_generator/training/parser.py (1)
97-102: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winHandle unreadable configuration artifacts.
get_model_configcan raiseOSErrororUnicodeDecodeErrorafter the file-existence check. These exceptions escapecan_parse.TrainingReporter.generatecallscan_parsebefore itstryblock, so one unreadable report artifact stops processing of later runs instead of logging a skip warning.Proposed fix
- except (json.JSONDecodeError, yaml.YAMLError) as exc: + except (OSError, UnicodeDecodeError, json.JSONDecodeError, yaml.YAMLError) as exc: logging.warning(f"{name}: invalid config artifact at '{config_path}' ({exc}); skipping training report") return False🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/cloudai/report_generator/training/parser.py` around lines 97 - 102, Update can_parse around the get_model_config call to also catch OSError and UnicodeDecodeError, logging the same skip warning used for malformed JSON/YAML artifacts. Ensure unreadable configuration files return the non-parseable result so TrainingReporter.generate can continue processing subsequent runs.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/cloudai/report_generator/training/reporter.py`:
- Around line 42-44: In the parser selection flow, add a warning log immediately
before the continue when parser_cls is None, identifying the skipped unsupported
workload using tr.test.test_template_name. Keep the existing skip behavior
unchanged.
---
Outside diff comments:
In `@src/cloudai/report_generator/training/parser.py`:
- Around line 97-102: Update can_parse around the get_model_config call to also
catch OSError and UnicodeDecodeError, logging the same skip warning used for
malformed JSON/YAML artifacts. Ensure unreadable configuration files return the
non-parseable result so TrainingReporter.generate can continue processing
subsequent runs.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 772e9e84-6dde-4407-b145-b39d24eae80f
📒 Files selected for processing (14)
doc/training-report-schema.mdsrc/cloudai/_core/test_scenario.pysrc/cloudai/core.pysrc/cloudai/parser.pysrc/cloudai/registration.pysrc/cloudai/report_generator/training/__init__.pysrc/cloudai/report_generator/training/mappings.pysrc/cloudai/report_generator/training/models.pysrc/cloudai/report_generator/training/parser.pysrc/cloudai/report_generator/training/reporter.pytests/report_generator/training/test_training_parser.pytests/test_init.pytests/test_parser.pytests/test_test_scenario.py
Include identity, environment, hardware, precision, and parallelism details so training reports capture the resolved run context. Signed-off-by: Ben Lugassi <blugassi@nvidia.com>
Generate per-run training reports from a scenario reporter so parsers can include scenario-level context. Signed-off-by: Ben Lugassi <blugassi@nvidia.com>
Signed-off-by: Ben Lugassi <blugassi@nvidia.com>
1468060 to
243c357
Compare
|
|
||
| ### 0.0 | ||
|
|
||
| Initial schema. |
There was a problem hiding this comment.
I would prefer to have a visualized block of the current class definition here at the very end using autoclass and members directives pointing to MetricStats (see other rst files for reference)
There was a problem hiding this comment.
oh yes, please convert the whole file into rst format
Summary
training_report.jsonwith schema versioning, run identity, environment, hardware, precision, parallelism, and configuration-source metadata.TrainingReporter.1.0.Test Plan
Tested on Linux with Python 3.12.
Branch-focused result: 140 tests passed.
Both Ruff checks passed. Changed-file Pyright completed with zero errors.
Ran
cloudai generate-reportagainst existing NeMoRun, MegatronRun, and Megatron-Bridge results. All three generated valid reports containing the new metadata and resolved absolute configuration paths.Additional Notes
Unsupported workloads and runs missing required artifacts are skipped with warnings. Configuration paths use empty strings when provenance is unavailable.