Skip to content

Feat/training report metadata - #992

Merged
podkidyshev merged 4 commits into
NVIDIA:mainfrom
blugassi:feat/training-report-metadata
Aug 12, 2026
Merged

Feat/training report metadata#992
podkidyshev merged 4 commits into
NVIDIA:mainfrom
blugassi:feat/training-report-metadata

Conversation

@blugassi

Copy link
Copy Markdown
Contributor

Summary

  • Expand training_report.json with schema versioning, run identity, environment, hardware, precision, parallelism, and configuration-source metadata.
  • Replace workload-specific report strategies with one scenario-level TrainingReporter.
  • Add validation for required TensorBoard and configuration artifacts.
  • Document schema version 1.0.

Test Plan

Tested on Linux with Python 3.12.

python -m pytest tests/report_generator/training/test_training_parser.py \
  tests/test_parser.py tests/test_init.py tests/test_test_scenario.py

Branch-focused result: 140 tests passed.

pre-commit run ruff-check --all-files
pre-commit run ruff-format --all-files

Both Ruff checks passed. Changed-file Pyright completed with zero errors.

Ran cloudai generate-report against 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.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 0cae1a77-334f-4229-b3c6-ee69932b6d0a

📥 Commits

Reviewing files that changed from the base of the PR and between 328a108 and 80d4f06.

📒 Files selected for processing (1)
  • doc/training-report-schema.rst

📝 Walkthrough

Walkthrough

Changes

The PR adds scenario configuration provenance, expands the training report schema and parser output, replaces the training report strategy with a multi-run reporter, and updates registration, tests, and documentation.

Training report pipeline

Layer / File(s) Summary
Report schema and configuration contract
src/cloudai/report_generator/training/models.py, src/cloudai/report_generator/training/mappings.py, doc/...
Adds schema versioning and documents the unified report schema. Adds FP8, expert parallelism, container image, and aggregation mappings.
Scenario configuration provenance
src/cloudai/_core/test_scenario.py, src/cloudai/core.py, src/cloudai/parser.py, tests/test_parser.py
Adds public ConfigPaths metadata and attaches resolved system, tests directory, and scenario paths to parsed scenarios.
Scenario-aware training parsing
src/cloudai/report_generator/training/parser.py, tests/report_generator/training/test_training_parser.py
Passes scenarios into training parsing and populates identity, provenance, environment, host, node, GPU, model, and clique configuration fields.
Multi-run reporter registration
src/cloudai/report_generator/training/reporter.py, src/cloudai/registration.py, src/cloudai/report_generator/training/__init__.py, tests/...
Replaces the previous strategy with TrainingReporter, processes supported runs independently, and registers the enabled "training" report. Tests update reporter expectations and coverage.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

  • NVIDIA/cloudai#991: Shares changes to TestRun/TestScenario configuration state used by reporting and scenario parsing.

Suggested labels: feature

Suggested reviewers: jj10306

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding metadata to training reports.
Description check ✅ Passed The description directly covers the training report metadata, reporter changes, validation, documentation, and testing.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 win

Handle unreadable configuration artifacts.

get_model_config can raise OSError or UnicodeDecodeError after the file-existence check. These exceptions escape can_parse. TrainingReporter.generate calls can_parse before its try block, 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

📥 Commits

Reviewing files that changed from the base of the PR and between 5b5c0f7 and 1468060.

📒 Files selected for processing (14)
  • doc/training-report-schema.md
  • src/cloudai/_core/test_scenario.py
  • src/cloudai/core.py
  • src/cloudai/parser.py
  • src/cloudai/registration.py
  • src/cloudai/report_generator/training/__init__.py
  • src/cloudai/report_generator/training/mappings.py
  • src/cloudai/report_generator/training/models.py
  • src/cloudai/report_generator/training/parser.py
  • src/cloudai/report_generator/training/reporter.py
  • tests/report_generator/training/test_training_parser.py
  • tests/test_init.py
  • tests/test_parser.py
  • tests/test_test_scenario.py

Comment thread src/cloudai/report_generator/training/reporter.py
@blugassi
blugassi force-pushed the feat/training-report-metadata branch from 1468060 to 243c357 Compare August 10, 2026 12:13
Comment thread doc/training-report-schema.md Outdated
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>
@blugassi
blugassi force-pushed the feat/training-report-metadata branch from 243c357 to 328a108 Compare August 12, 2026 07:38

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 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 `@doc/training-report-schema.rst`:
- Around line 47-50: Update the schema history section around the 0.0 entry:
either remove the incomplete 0.0 history entry, or add its release date and
document the 0.0 contract so the version history is unambiguous alongside the
1.0 entry.
- Around line 34-36: Update the field documentation in the training report
schema, including the corresponding fields around the additional referenced
section, to state each key’s requiredness and whether absent values are omitted
or encoded as null. Document that configuration path fields use resolved
absolute paths when available and empty strings when provenance is unavailable.
- Around line 4-5: Fix the broken download reference in the training report
documentation by either adding the missing unified-training-output-design.md
file under doc or updating the :download: target to an existing .rst source
accepted by doc/conf.py. Ensure the link resolves successfully in the
documentation build.
🪄 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: 39013e3c-3bf6-4fcc-8fa7-4698ff9d652d

📥 Commits

Reviewing files that changed from the base of the PR and between 243c357 and 328a108.

📒 Files selected for processing (2)
  • doc/index.rst
  • doc/training-report-schema.rst

Comment thread doc/training-report-schema.rst Outdated
Comment thread doc/training-report-schema.rst
Comment thread doc/training-report-schema.rst Outdated
@blugassi
blugassi force-pushed the feat/training-report-metadata branch 2 times, most recently from 80d4f06 to 99c593e Compare August 12, 2026 07:56

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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 `@doc/training-report-schema.rst`:
- Around line 23-44: Add test_template_name with its string type to the
root.config field list for schema version 1.0, alongside the other
TrainingConfig fields. Ensure the documentation matches the field written by
TrainingParser._build_config.
🪄 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: 493b74fb-d793-4c1f-852e-5feab35df8d6

📥 Commits

Reviewing files that changed from the base of the PR and between 80d4f06 and 99c593e.

📒 Files selected for processing (1)
  • doc/training-report-schema.rst

Comment thread doc/training-report-schema.rst
Signed-off-by: Ben Lugassi <blugassi@nvidia.com>
@blugassi
blugassi force-pushed the feat/training-report-metadata branch from 99c593e to f5efccd Compare August 12, 2026 09:08
@blugassi
blugassi requested a review from podkidyshev August 12, 2026 09:18
@podkidyshev
podkidyshev merged commit 9f1c117 into NVIDIA:main Aug 12, 2026
5 checks passed
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