Skip to content

tests: AUT-684 add unit coverage for python_test_utils common IO and golden-value CLI#5654

Draft
svcnemo-autobot wants to merge 1 commit into
NVIDIA:mainfrom
svcnemo-autobot:ci/implement-73c4c02be6eb
Draft

tests: AUT-684 add unit coverage for python_test_utils common IO and golden-value CLI#5654
svcnemo-autobot wants to merge 1 commit into
NVIDIA:mainfrom
svcnemo-autobot:ci/implement-73c4c02be6eb

Conversation

@svcnemo-autobot

Copy link
Copy Markdown
Collaborator

Added a new test_common_io.py covering previously-untested code in tests/functional_tests/python_test_utilscommon.py's GoldenValueMetric.__repr__, GoldenValues parsing, read_golden_values_from_json (valid + missing-file), read_tb_logs_as_list/_load_event_accumulators_with_scalars (no-files, no-scalars, out-of-range index, nan back-fill, dedup, convergence merge), and the get_test_results_from_tensorboard_logs.collect_train_test_metrics CLI (metric filtering, convergence index, JSON output, no-logs case); TensorBoard accumulators are faked so tests need no training run. Existing pipeline/Test coverage in test_common.py was left as-is.

@svcnemo-autobot svcnemo-autobot requested a review from a team as a code owner July 4, 2026 23:58
@copy-pr-bot

copy-pr-bot Bot commented Jul 4, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

This PR has been automatically converted to draft because all PRs must start as drafts.

When you are ready for review, click Ready for Review to begin the review process. This will:

  1. Add the oncall reviewer (optional reviewer)
  2. Add required review teams based on your changes

See the contribution guide for more details.

@svcnemo-autobot

Copy link
Copy Markdown
Collaborator Author

/ok to test 1dcf2ec

@copy-pr-bot

copy-pr-bot Bot commented Jul 5, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@svcnemo-autobot

Copy link
Copy Markdown
Collaborator Author

/ok to test 46bae11

@svcnemo-autobot

Copy link
Copy Markdown
Collaborator Author

/ok to test 6c89409

…nd golden-value CLI

Add pure-CPU unit tests, under tests/unit_tests/ so the unit-test CI harness
(tests/unit_tests/**/*.py bucket) discovers them, for the helpers in
tests/functional_tests/python_test_utils: common.py's IO/model helpers
(read_tb_logs_as_list, _load_event_accumulators_with_scalars,
read_golden_values_from_json, GoldenValueMetric.__repr__, GoldenValues) and the
get_test_results_from_tensorboard_logs.collect_train_test_metrics CLI.
TensorBoard event accumulators are faked so no GPU or training run is required.
@svcnemo-autobot

Copy link
Copy Markdown
Collaborator Author

/ok to test 9b350b3

nemo-autobot-origin Bot added a commit to svcnemo-autobot/Megatron-LM that referenced this pull request Jul 5, 2026
…ssing file

Continues PR NVIDIA#5654: adds the functional python_test_utils unit-coverage
file plus a stricter test (test_missing_file_raises_value_error_naming_path)
pinning the documented missing-file contract. On the current code this
FAILS because read_golden_values_from_json opens the file before the
os.path.exists guard, so a missing file raises FileNotFoundError and the
ValueError branch is unreachable. The follow-up commit fixes it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant