Skip to content

ci: Bump Megatron-Bridge to 8c46dc42 - #3658

Merged
yuki-97 merged 5 commits into
mainfrom
yifu/bump_mbridge_20260814
Aug 18, 2026
Merged

yuki-97 merged 5 commits into
mainfrom
yifu/bump_mbridge_20260814

Conversation

@yfw

@yfw yfw commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do ?

Bumps 3rdparty/Megatron-Bridge-workspace/Megatron-Bridge from 0c565c9a to 8c46dc42 ("feat(model): let callers supply a media-token validity mask", NVIDIA-NeMo/Megatron-Bridge#5573), which brings the nested Megatron-LM from d12f6c8c to 14346b65.

Deliberately stops short of cb3f319a ("build: AUT-1346 pin wandb to 0.27.2", #5347), the next-newest pyproject-touching commit on Megatron-Bridge main. That commit pins wandb==0.27.2, which is unsatisfiable against NeMo RL's wandb>=0.28.0 floor. 8c46dc42 still carries wandb>=0.25.0, so no override-dependencies entry is needed here.

Issues

List issues that this PR closes (syntax):

Usage

  • You can potentially add a usage example below
# Add a code snippet demonstrating how to use this

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you run the unit tests and functional tests locally? Visit our Testing Guide for how to run tests
  • Did you add or update any necessary documentation? Visit our Document Development Guide for how to write, build and test the docs.

Additional Information

CI: d69c26f2d (Megatron-Bridge → 8c46dc42) vs main nightly

H100 — 62834617 vs 62663912 (main, d7c6a1c91)

Test Bump Nightly
llm_distillation_qwen3_32b_to_1_7b_base_1n8g_megatron_tp2pp2cp2_pack ✅ ❌
llm_grpo_llama3_1_8b_instruct_2n8g_megatron_fp8_e2e ✅ ❌
llm_dpo_llama3_1_8b_instruct_4n8g_megatrontp2pp2_quick ✅ ✅
llm_grpo_llama3_1_8b_instruct_1n8g_megatron_fp8_rollouts_v3 ✅ ✅
llm_grpo_nano_v2_12b_1n8g_megatron ✅ ✅
llm_grpo_nemotron3_super_120BA12B_16n8g_megatron ✅ ✅
llm_grpo_qwen3_8b_base_1n8g_megatron_lora ✅ ✅
llm_sft_llama3_1_8b_1n8g_megatron_lora ✅ ✅
llm_sft_llama3_1_8b_1n8g_megatron_seqpack ✅ ✅
llm_sft_qwen2_5_math7b_2n8g_megatron ✅ ✅
llm_grpo_llama3_2_1b_instruct_1n8g_megatron ✅ —
llm_grpo_llama3_2_1b_instruct_1n8g_megatron_generation ✅ —
llm_grpo_qwen2_5_math_1_5b_instruct_1n8g_fsdp2tp1_v3 ✅ —
vlm_vlm_grpo_qwen2_5_vl_3b_instruct_clevr_1n8g_megatrontp2_v1 ✅ —

GB200 — 62834610 vs 62663829 (main GB200 nightly)

Test Bump Nightly
llm_distillation_qwen3_32b_to_1_7b_base_1n4g_megatron_tp1pp2cp2_pack ✅ 🔁 ❌
vlm_vlm_grpo_qwen2_5_vl_3b_instruct_clevr_1n4g_megatrontp1_v1 ✅ ❌
llm_dpo_llama3_1_8b_instruct_4n4g_megatrontp1pp2_quick ✅ ✅
llm_grpo_llama3_2_1b_instruct_1n4g_megatron ✅ ✅
llm_grpo_llama3_2_1b_instruct_1n4g_megatron_generation ✅ 🔁 ✅
llm_grpo_nano_v2_12b_1n4g_megatron ✅ ✅
llm_sft_qwen2_5_math7b_2n4g_megatron ✅ ✅
llm_grpo_qwen2_5_math_1_5b_instruct_1n4g_fsdp2tp1_v3 ✅ —

🔁 = passed on retry. — = no exact-name counterpart in that nightly (it ran _tq_simple/_tq_mooncake variants at d7c6a1c91).

22/22 pass, no regressions. Four tests pass on the bump that fail on main.

Bumps 3rdparty/Megatron-Bridge-workspace/Megatron-Bridge from 0c565c9a to
8c46dc42 ("feat(model): let callers supply a media-token validity mask",
NVIDIA-NeMo/Megatron-Bridge#5573), which brings the nested Megatron-LM from
d12f6c8c to 14346b65.

Deliberately stops short of cb3f319a ("build: AUT-1346 pin wandb to 0.27.2",
#5347), the next-newest pyproject-touching commit on Megatron-Bridge main.
That commit pins wandb==0.27.2, which is unsatisfiable against NeMo RL's
wandb>=0.28.0 floor. 8c46dc42 still carries wandb>=0.25.0, so no
override-dependencies entry is needed here.

The uv.lock diff is large but almost entirely inert marker expansion. The only
resolution change is dropping the duplicate fla-core / flash-linear-attention
0.4.2 entries (551 -> 549 packages); collapsing that resolution fork made uv
rewrite dependency markers file-wide. Verified with a control `uv lock` at
0c565c9a, which reproduces the committed lockfile byte-for-byte, so all churn
here is attributable to the bump rather than pre-existing drift.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
@yfw
yfw requested review from a team as code owners August 14, 2026 23:33
@copy-pr-bot

copy-pr-bot Bot commented Aug 14, 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

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: d69c26f (PR #3658 from yifu/bump_mbridge_20260814)

✅ Submodules that are properly updated:

Megatron-Bridge: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@yfw yfw added the CI:L1 Run doctests, unit tests, and functional tests label Aug 16, 2026
@yfw

yfw commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 6994333

@github-actions

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 6994333 (PR #3658 from yifu/bump_mbridge_20260814)

✅ Submodules that are properly updated:

Megatron-Bridge: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

Megatron-Bridge 8c46dc42 includes upstream commit 31121a48b
("refactor(quant)!: simplify quantization examples and fix calibration
dataset load", NVIDIA-NeMo/Megatron-Bridge#5337), a flagged breaking change
that moved shared helpers into a sibling module. examples/quantization/export.py
now starts with:

    from quantize_utils import (add_common_model_args, build_bridge_and_provider, ...)

That resolves under `python export.py`, which puts the script's directory on
sys.path[0], but not under runpy.run_path(), which does not modify sys.path for
a plain file path. The wrapper therefore died with:

    ModuleNotFoundError: No module named 'quantize_utils'

failing tests/functional/qa_distillation_megatron.sh at the export step.

Insert the upstream script's directory into sys.path before delegating, which
reproduces what a direct `python export.py` invocation would provide.
quantize_utils itself imports only installed packages, so one insert suffices.

The upstream refactor left the CLI surface intact -- --hf-model-id/--tp/--pp
still come from add_common_model_args, and --megatron-load-path/--export-dir
remain in export.py -- so no caller arguments needed updating.

Audited the rest of the repo for the same breaking change: export.py is the only
Megatron-Bridge quantization script NeMo RL invokes, and the only other
runpy.run_path() caller (nemo_rl/__init__.py -> tools/generate_fingerprint.py)
targets a script with stdlib-only imports.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
@yfw
yfw requested a review from a team as a code owner August 17, 2026 17:00
Resolves the uv.lock conflict by regenerating rather than hand-merging.

main added torch-memory-saver to the mcore extra (#3602), which collided with
this branch's lockfile rewrite from the Megatron-Bridge 8c46dc42 bump. Both
sides touch the same regions, so a textual merge is not meaningful for a
generated file.

Resolution: took main's uv.lock as the base, then re-ran `uv lock` against the
merged pyproject.toml with the submodule at 8c46dc42. Verified:
  - torch-memory-saver>=0.0.9.post1 present under the mcore extra
  - megatron-bridge metadata resolves wandb>=0.25.0, i.e. the bumped submodule
  - `uv lock --check` passes (549 packages)

pyproject.toml and all other files auto-merged with no conflicts; submodules
remain at Megatron-Bridge 8c46dc42 / Megatron-LM 14346b65.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
@yfw

yfw commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 1b1a3be

@github-actions

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 1b1a3be (PR #3658 from yifu/bump_mbridge_20260814)

✅ Submodules that are properly updated:

Megatron-Bridge: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@yfw

yfw commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 2c6d0b3

@github-actions

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 2c6d0b3 (PR #3658 from yifu/bump_mbridge_20260814)

✅ Submodules that are properly updated:

Megatron-Bridge: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@yuki-97
yuki-97 merged commit 04a687d into main Aug 18, 2026
196 of 204 checks passed
@yuki-97
yuki-97 deleted the yifu/bump_mbridge_20260814 branch August 18, 2026 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:L1 Run doctests, unit tests, and functional tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants