fix(ci): AUT-957 support golden checks in merge queue - #5989
Merged
ko3n1g merged 2 commits intoJul 23, 2026
Conversation
- Introduced a new step in the CI workflow to validate golden-value JSON files for NaN and infinity values. - Added a new script, `check_golden_values.py`, to perform the validation checks on the specified files. - The validation step is triggered during pull request pushes, ensuring that any updates to golden values are properly checked before merging. Signed-off-by: [Your Name] <your.email@example.com> Co-authored-by: [Co-author Name] <coauthor.email@example.com> Signed-off-by: Ajay Balasa <abalasa@nvidia.com> Signed-off-by: svcnemo-autobot <svcnemo-autobot@nvidia.com>
Signed-off-by: svcnemo-autobot <svcnemo-autobot@nvidia.com>
svcnvidia-nemo-ci
marked this pull request as draft
July 23, 2026 07:38
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. |
|
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. |
ko3n1g
approved these changes
Jul 23, 2026
Collaborator
Author
|
/ok to test a6eb587 |
6 tasks
6 tasks
svcnvidia-nemo-ci
pushed a commit
that referenced
this pull request
Jul 24, 2026
The linting job's new 'Validate updated golden values' step (check_golden_values.py, added on main via #5989) rejects any non-finite value in golden-value JSON files that differ from the base branch. Three golden files were refreshed on main (#5953 BERT H100, #5816 MoE GB200) and taken into this sync; each carries a 'nan' at iteration-time.values['1'] — the warmup iteration. The functional comparison harness (python_test_utils/common.py) evaluates iteration-time only over a steady-state window (range(5,21) or range(30,46)), so the warmup iteration is never read. Replacing the warmup 'nan' with iteration 2's finite value is inert for the comparison but satisfies the finiteness gate. All of main's refreshed measured data is preserved (one line changed per file). Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
svcnvidia-nemo-ci
pushed a commit
that referenced
this pull request
Jul 24, 2026
Two Phase-3 CI fixes for the 23_07_2026 nightly sync: 1. Golden-value finiteness (linting job, tools/check_golden_values.py from #5989): replace the warmup-iteration "nan" at iteration-time.values["1"] in three main-refreshed golden files with iteration 2's finite value. The value stays outside the steady_window used by the functional comparison harness, so it is inert for accuracy comparison; only the new finiteness gate (which runs on files differing from origin/dev) was tripping. - tests/functional_tests/test_cases/bert/bert_mcore_tp1_pp2/golden_values_dev_dgx_h100.json - tests/functional_tests/test_cases/bert/bert_mcore_tp1_pp4_vp2/golden_values_dev_dgx_h100.json - tests/functional_tests/test_cases/moe/deepseek_proxy_fsdp_ep2_fsdp2/golden_values_dev_dgx_gb200.json 2. hybrid->dynamic context-parallel rename (Pip install-test ImportError): megatron/training/training.py was taken from main (skill override list), but main's callers reference get_hybrid_data_context_parallel_groups / args.hybrid_context_parallel while dev's parallel_state.py defines get_dynamic_data_context_parallel_groups and arguments.py defines dynamic_context_parallel. Renamed all four references to match dev's API, matching dev's own training.py. Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
svcnvidia-nemo-ci
pushed a commit
that referenced
this pull request
Jul 24, 2026
Three Phase-3 CI fixes for the 23_07_2026 nightly sync: 1. Golden-value finiteness (linting job, tools/check_golden_values.py from #5989): replace the warmup-iteration "nan" at iteration-time.values["1"] in three main-refreshed golden files with iteration 2's finite value. The value stays outside the steady_window used by the functional comparison harness, so it is inert for accuracy comparison; only the new finiteness gate (which runs on files differing from origin/dev) was tripping. - tests/functional_tests/test_cases/bert/bert_mcore_tp1_pp2/golden_values_dev_dgx_h100.json - tests/functional_tests/test_cases/bert/bert_mcore_tp1_pp4_vp2/golden_values_dev_dgx_h100.json - tests/functional_tests/test_cases/moe/deepseek_proxy_fsdp_ep2_fsdp2/golden_values_dev_dgx_gb200.json 2. hybrid->dynamic context-parallel rename (Pip install-test ImportError): megatron/training/training.py was taken from main (skill override list), but main's callers reference get_hybrid_data_context_parallel_groups / args.hybrid_context_parallel while dev's parallel_state.py defines get_dynamic_data_context_parallel_groups and arguments.py defines dynamic_context_parallel. Renamed all four references to match dev's API, matching dev's own training.py. 3. Duplicate PackedSeqParams field (build-docs --fail-on-warning: 'Duplicate item ...PackedSeqParams.pad_between_seqs [autodoc2.dup_item]'). Merge accident in megatron/core/packed_seq_params.py: dev added 'pad_between_seqs: Optional[bool]' (plus dev-only cp_partition_mode) and main added 'pad_between_seqs: bool' at a different position; the merge kept both. Removed main's duplicate, kept dev's Optional[bool] (superset). All 14 dataclass fields now present exactly once. Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
svcnvidia-nemo-ci
pushed a commit
that referenced
this pull request
Jul 24, 2026
Three Phase-3 CI fixes for the 23_07_2026 nightly sync: 1. Golden-value finiteness (linting job, tools/check_golden_values.py from #5989): replace the warmup-iteration "nan" at iteration-time.values["1"] in three main-refreshed golden files with iteration 2's finite value. The value stays outside the steady_window used by the functional comparison harness, so it is inert for accuracy comparison; only the new finiteness gate (which runs on files differing from origin/dev) was tripping. - tests/functional_tests/test_cases/bert/bert_mcore_tp1_pp2/golden_values_dev_dgx_h100.json - tests/functional_tests/test_cases/bert/bert_mcore_tp1_pp4_vp2/golden_values_dev_dgx_h100.json - tests/functional_tests/test_cases/moe/deepseek_proxy_fsdp_ep2_fsdp2/golden_values_dev_dgx_gb200.json 2. hybrid->dynamic context-parallel rename (Pip install-test ImportError): megatron/training/training.py was taken from main (skill override list), but main's callers reference get_hybrid_data_context_parallel_groups / args.hybrid_context_parallel while dev's parallel_state.py defines get_dynamic_data_context_parallel_groups and arguments.py defines dynamic_context_parallel. Renamed all four references to match dev's API, matching dev's own training.py. 3. Duplicate PackedSeqParams field (build-docs --fail-on-warning: 'Duplicate item ...PackedSeqParams.pad_between_seqs [autodoc2.dup_item]'). Merge accident in megatron/core/packed_seq_params.py: dev added 'pad_between_seqs: Optional[bool]' (plus dev-only cp_partition_mode) and main added 'pad_between_seqs: bool' at a different position; the merge kept both. Removed main's duplicate, kept dev's Optional[bool] (superset). All 14 dataclass fields now present exactly once. Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
svcnvidia-nemo-ci
added a commit
that referenced
this pull request
Jul 29, 2026
The main->dev merge adopts main's new golden-value validation (tools/check_golden_values.py + the linting job's "Validate updated golden values" step, added by #5989 / AUT-957 on 2026-07-23). That step runs check_golden_values.py on every golden file that differs from the PR base and rejects any NaN/Inf. The merge pulled main's versions of three golden files that predate the check (refreshed by #5953 on 07-22 and #5816 on 07-20), so they still encode the warmup-step iteration timer as the legacy sentinel "1": "nan". main's own post-check convention (e.g. the MoE goldens refreshed by #5916 AFTER the check landed, which passed CI) is to omit the step-1 iteration-time cell entirely and set start_step: 2, rather than store "nan". Eleven files already in the corpus have exactly this shape. Bring the three stale files into that convention: in the iteration-time block only, drop "1": "nan" and set start_step 1->2. All other metrics and all other steps are byte-for-byte unchanged. This regresses no data: step-1 iteration-time is never read by the functional comparator (it only evaluates the steady-window steps 5-21 / 30-46) nor by compare_golden_values_kl.py (which skips non-finite via math.isfinite). Signed-off-by: svcnvidia-nemo-ci <svcnvidia-nemo-ci@nvidia.com>
svcnvidia-nemo-ci
added a commit
that referenced
this pull request
Jul 29, 2026
Golden values: drop the stale step-1 iteration-time NaN sentinel in three functional-test golden files (bert_mcore_tp1_pp2, bert_mcore_tp1_pp4_vp2, deepseek_proxy_fsdp_ep2_fsdp2) and set start_step=2, matching main's own post-check convention. The new-on-main tools/check_golden_values.py (AUT-957, #5989) rejects non-finite sentinels; these files predate the check and were never refreshed under it. No numeric data changed — step-1 iteration-time is a warmup-timer artifact that every comparator already skips. Dropped imports (3-way merge kept main's usages but dev's narrower import line): - dynamic_engine.py: restore InferenceBatchDimensions, CUDAGraphBatchDimensionBuilder from batch_dimensions_utils (main #5939). - dynamic_context.py: restore MAX_INTERMEDIATE_OFFSETS_PER_REQUEST from mamba_slot_allocator. - optimizer.py: restore 'from itertools import chain' for the GTP-backfill helper main added. A tree-wide pylint E0602/E0601 sweep over all merge-changed files confirms no other dropped-import merge accidents remain (all residual findings are pre-existing pylint flow-analysis false positives present on dev and/or main). Signed-off-by: svcnvidia-nemo-ci <svcnvidia-nemo-ci@nvidia.com>
svcnvidia-nemo-ci
added a commit
that referenced
this pull request
Jul 29, 2026
Golden values: drop the stale step-1 iteration-time NaN sentinel in three functional-test golden files (bert_mcore_tp1_pp2, bert_mcore_tp1_pp4_vp2, deepseek_proxy_fsdp_ep2_fsdp2) and set start_step=2, matching main's own post-check convention. The new-on-main tools/check_golden_values.py (AUT-957, #5989) rejects non-finite sentinels; these files predate the check and were never refreshed under it. No numeric data changed — step-1 iteration-time is a warmup-timer artifact that every comparator already skips. Dropped imports (3-way merge kept main's usages but dev's narrower import line): - dynamic_engine.py: restore InferenceBatchDimensions, CUDAGraphBatchDimensionBuilder from batch_dimensions_utils (main #5939). - dynamic_context.py: restore MAX_INTERMEDIATE_OFFSETS_PER_REQUEST from mamba_slot_allocator. - optimizer.py: restore 'from itertools import chain' for the GTP-backfill helper main added. API mismatch from override-from-main file (the hybrid→dynamic context-parallel rename dev landed and main had not): - training.py: main's version imported/called get_hybrid_data_context_parallel_groups, but the merged parallel_state.py (dev's) defines only get_dynamic_data_context_parallel_groups (a byte-identical rename). Point both the import and the get_batch_on_this_cp_rank call at the dynamic name, matching dev's own pretrain_hybrid.py. args.dynamic_context_parallel was already correct in the merged training.py. A tree-wide pylint E0602/E0601 sweep plus a static def-level import resolver over all 611 megatron/*.py files confirm no other dropped-import or renamed-symbol merge accidents remain; residual static findings are pre-existing false positives (guarded try/except loss_scaler import, compiled helpers_cpp extension, and pylint flow-analysis FPs present on dev and/or main). Signed-off-by: svcnvidia-nemo-ci <svcnvidia-nemo-ci@nvidia.com>
shjwudp
pushed a commit
to shjwudp/Megatron-LM
that referenced
this pull request
Jul 30, 2026
Signed-off-by: [Your Name] <your.email@example.com> Signed-off-by: Ajay Balasa <abalasa@nvidia.com> Signed-off-by: svcnemo-autobot <svcnemo-autobot@nvidia.com> Co-authored-by: Ajay Balasa <abalasa@nvidia.com> Co-authored-by: [Co-author Name] <coauthor.email@example.com>
svcnvidia-nemo-ci
pushed a commit
that referenced
this pull request
Jul 30, 2026
…iles The main-only linting check tools/check_golden_values.py (added by #5989, after the last main->dev sync) rejects any NaN/Inf token in golden-value JSON files that changed relative to the PR base (dev). Three files carried a leading "iteration-time"."values"."1" = "nan" warmup placeholder that was present on both dev and main and inherited by this merge: - bert/bert_mcore_tp1_pp2/golden_values_dev_dgx_h100.json - bert/bert_mcore_tp1_pp4_vp2/golden_values_dev_dgx_h100.json - moe/deepseek_proxy_fsdp_ep2_fsdp2/golden_values_dev_dgx_gb200.json The runtime iteration-time comparison (tests/functional_tests/python_test_utils/ common.py) evaluates only a steady-state window (steps 5-20 or 30-45) reduced to a single median, so step 1 is never compared. Replacing the step-1 warmup placeholder with a finite 0.0 is therefore comparison-neutral and unblocks the lint gate without altering any evaluated golden value. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
svcnvidia-nemo-ci
pushed a commit
that referenced
this pull request
Jul 30, 2026
Two Phase-3 fixes for the 30_07_2026 main->dev sync: 1) megatron/core/inference/engines/dynamic_engine.py — the merge dropped two main-only lines (CG admission gating, #4870), which dev did not have, causing the Pip/UV import checks to fail with 'NameError: name InferenceBatchDimensions is not defined' at class definition time and breaking import of the whole megatron.core.inference package: - restored 'from megatron.core.inference.batch_dimensions_utils import (CUDAGraphBatchDimensionBuilder, InferenceBatchDimensions)' (both symbols are used: lines 1663/1784/1815/1836/1845) - restored 'self.cuda_graph_all_prefills = inference_config.cuda_graph_all_prefills' (read at line ~1759; inference_config field exists in config.py). The file is now byte-identical to origin/main. 2) Three golden-value JSON files carried an inherited 'iteration-time'.'values'.'1' = 'nan' warmup placeholder rejected by the new main-only lint tools/check_golden_values.py (#5989). The runtime iteration-time comparison only evaluates a steady-state window (steps 5-20 or 30-45), so step 1 is never compared; replaced with a finite 0.0: - bert/bert_mcore_tp1_pp2/golden_values_dev_dgx_h100.json - bert/bert_mcore_tp1_pp4_vp2/golden_values_dev_dgx_h100.json - moe/deepseek_proxy_fsdp_ep2_fsdp2/golden_values_dev_dgx_gb200.json Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
svcnvidia-nemo-ci
pushed a commit
that referenced
this pull request
Jul 30, 2026
…en warmup values Three Phase-3 fixes for the 30_07_2026 main->dev sync: 1) megatron/core/inference/engines/dynamic_engine.py — the merge dropped two main-only lines (CG admission gating, #4870) that dev lacked, causing 'NameError: name InferenceBatchDimensions is not defined' at class definition and breaking import of the whole megatron.core.inference package. Restored the batch_dimensions_utils import (CUDAGraphBatchDimensionBuilder, InferenceBatchDimensions; both used) and 'self.cuda_graph_all_prefills = inference_config.cuda_graph_all_prefills'. File is now byte-identical to origin/main. 2) megatron/training/training.py — taking main's version reintroduced the old symbol name 'get_hybrid_data_context_parallel_groups', which dev renamed to 'get_dynamic_data_context_parallel_groups' in megatron/core/parallel_state.py. This broke 'Check imports for megatron.training' with 'ImportError: cannot import name get_hybrid_data_context_parallel_groups'. Renamed both the import (line 95) and the call site (hybrid_cp_group_func=..., line ~2499) to the dev name, matching origin/dev. A full stale-import audit of megatron/training found no other renamed symbols. 3) Three golden-value JSON files carried an inherited 'iteration-time'.'values'.'1' = 'nan' warmup placeholder rejected by the new main-only lint tools/check_golden_values.py (#5989). The runtime iteration-time comparison only evaluates a steady-state window (steps 5-20 or 30-45), so step 1 is never compared; replaced with a finite 0.0: - bert/bert_mcore_tp1_pp2/golden_values_dev_dgx_h100.json - bert/bert_mcore_tp1_pp4_vp2/golden_values_dev_dgx_h100.json - moe/deepseek_proxy_fsdp_ep2_fsdp2/golden_values_dev_dgx_gb200.json Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
terminator123
pushed a commit
to 021ai/Megatron-LM
that referenced
this pull request
Aug 3, 2026
Signed-off-by: [Your Name] <your.email@example.com> Signed-off-by: Ajay Balasa <abalasa@nvidia.com> Signed-off-by: svcnemo-autobot <svcnemo-autobot@nvidia.com> Co-authored-by: Ajay Balasa <abalasa@nvidia.com> Co-authored-by: [Co-author Name] <coauthor.email@example.com>
svcnvidia-nemo-ci
pushed a commit
to dimapihtar/Megatron-LM
that referenced
this pull request
Aug 4, 2026
Signed-off-by: [Your Name] <your.email@example.com> Signed-off-by: Ajay Balasa <abalasa@nvidia.com> Signed-off-by: svcnemo-autobot <svcnemo-autobot@nvidia.com> Co-authored-by: Ajay Balasa <abalasa@nvidia.com> Co-authored-by: [Co-author Name] <coauthor.email@example.com> Signed-off-by: Dmytro Pykhtar <dpykhtar@nvidia.com>
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.
Background
Merge-group run 29983603449 failed in
linting:get-pr-infois skipped formerge_group, while the golden-value step evaluatedfromJSONon its empty output and made the workflow template invalid. The PR event path itself passed in run 29902228424.What changed
merge_group.base_ref, with safe PR metadata fallback.refs/heads/prefix before fetching and diffing.main.Details
.github/workflows/cicd-main.ymlnow avoids parsing an emptyget-pr-infooutput and uses the merge-group event payload directly.tools/check_golden_values.pyis unchanged from #5959.Tested
uv sync --locked --only-group lintingBASE_REF=main CHECK_ONLY=true SKIP_DOCS=false bash tools/autoformat.shtools/check_golden_values.py