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
Draft
tests: AUT-684 add unit coverage for python_test_utils common IO and golden-value CLI#5654svcnemo-autobot wants to merge 1 commit into
svcnemo-autobot wants to merge 1 commit into
Conversation
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:
See the contribution guide for more details. |
Collaborator
Author
|
/ok to test 1dcf2ec |
1dcf2ec to
06b07a1
Compare
|
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. |
Collaborator
Author
|
/ok to test 46bae11 |
Collaborator
Author
|
/ok to test 6c89409 |
6c89409 to
06b07a1
Compare
…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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added a new
test_common_io.pycovering previously-untested code intests/functional_tests/python_test_utils—common.py'sGoldenValueMetric.__repr__,GoldenValuesparsing,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 theget_test_results_from_tensorboard_logs.collect_train_test_metricsCLI (metric filtering, convergence index, JSON output, no-logs case); TensorBoard accumulators are faked so tests need no training run. Existingpipeline/Testcoverage intest_common.pywas left as-is.