Repository navigation
refactor(training): migrate SchedulerConfig - #8211
Merged
Merged
Conversation
Contributor
|
/ok to test 14cb9c8 |
Signed-off-by: Maanu Grover <maanug@nvidia.com>
Contributor
|
/ok to test 1abfe6f |
Signed-off-by: Dmytro Pykhtar <dpykhtar@nvidia.com>
Contributor
Author
|
/ok to test bf2b9d3 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/39591348206 |
asolergi-nv
added a commit
to asolergi-nv/Megatron-LM
that referenced
this pull request
Oct 22, 2026
Forty upstream commits; five files conflicted, all against the data-section work: - megatron/training/config/container.py: NVIDIA#8149 / NVIDIA#8211 restructured PretrainConfigContainer.validate() into _validate_rl_config() and gave _finalize() the batch-size and scheduler resolution. Kept both: validate() ends with _validate_data_section(); _finalize() checks the dataset mirrors first, runs upstream's batch-size, RNG and scheduler steps, then writes the mirrors and finalizes the data section before the RL DDP finalize. - megatron/training/global_vars.py: NVIDIA#8149 made set_global_variables() finalize every PretrainConfigContainer after registering args and the run config. Taken as is; the branch's narrower "finalize when a dataset section exists" is subsumed (the dataset hook still requires a finalized container). - pretrain_gpt.py, pretrain_hybrid.py: upstream edited is_dataset_built_on_rank (NVIDIA#8378: the sequence-packing scheduler keeps data iterators on the first and last stages only) and core_gpt_dataset_config_from_args (NVIDIA#8149: validation flags read from cfg.validation) in place; the branch had moved both. The removal stands, the scheduler branch is ported into megatron.training.datasets.providers.is_dataset_built_on_rank, and the validation flags already come from cfg.validation through the mirrors. - tools/prepare_cache.py: both import lines kept; upstream's container registration (pretrain_cfg_container_from_args, finalize, set_run_config, update_train_iters(cfg.train)) stays next to the branch's standalone section. Tests: the ownership fixture registers the parsed arguments with a batch-parallel size and a micro batch, which _finalize() now resolves from the registered args; the bootstrap test expects loader-only containers to be finalized too; the loader-only fixture test registers a minimal namespace as upstream's finalize tests do. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: asolergi-nv <asolergibert@nvidia.com>
nemo-autobot-origin Bot
pushed a commit
to svcnemo-autobot/Megatron-LM
that referenced
this pull request
Oct 24, 2026
Repairs semantic interactions between the imported main slice (tip f9d9bdc) and dev dd8f93b found by the baseline sweep and review: - experimental_attention_variant/dsa_gqa.py: mark main NVIDIA#7156's DSGQACoreAttention as a DSA indexer-loss metric writer (logs_dsa_indexer_loss = True, as DSAttention and CSA do) so dev's fixed-capacity DSA metric tracker reserves capacity for it. - moe/experts.py: assign TEGroupedMLP.activation_recompute (and the fp8/fp4 set_save_original_input(linear_fc2) hook) before the fused-impl support check reads it; read main's _grouped_linear_kwargs with a getattr default in _make_fused_ops, matching the existing getattr(self, "activation_recompute", False) convention. - moe/router.py: restore main NVIDIA#7394's global-batch branch in TopKRouter.quantile_balancing(), gated on dev's use_quantile_balancing. - multi_token_prediction.py: black formatting (AST-equivalent). - test_attention_variant_dsa_gqa.py: cover metric-tracker initialization followed by a DSA-GQA training forward, with and without indexer loss. - test_fine_grained_activation_offloading.py: map expert_fc1 + moe_act to main's fused_group_mlp offload-summary group. - test_multi_token_prediction.py: apply main NVIDIA#8211's cfg.finalize() pattern in the dev-only TestMHCMTPIntegration. Signed-off-by: svcnemo-autobot <svcnemo-autobot@nvidia.com>
1 task
This branch was previously deployed
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.
What does this PR do?
Uses
cfg.schedulerreference instead ofargsforSchedulerConfigparams.Issue tracking
For PRs from open-source community contributors:
Linked issue:
Contribution process
Pre-checks
jit_fuser/torch.compile, CUDA extension, TE or external-library dispatch, or a scatter/index accumulation), I have added or updated its bit-exact determinism test and registered it intests/unit_tests/determinism/kernels/manifest.py(guide)Code review
Feel free to message or comment @NVIDIA/mcore-oncall to help accelerate your merge into main. The less complex your PR is, the faster it will be approved and merged!
All PRs start as draft. If you open a non-draft PR, it will be automatically converted to draft.
Step 1: Mark PR as "Ready for Review"
.github/CODEOWNERS.Final Review might get declined if these requirements are not fulfilled.
Step 2: Final Review
For PRs that change
megatron/core, once all expert reviewers have approved, theFinal Reviewlabel is applied automatically and final reviewers are assigned.For PRs outside
megatron/core, this step is skipped.Step 3: Approved
Once all required reviewers have approved, the
Approvedlabel is applied automatically.Merge
Any member of mcore-engineers will be able to merge your PR.