chore(beep boop 🤖): Bump uv.lock (main) (2026-02-17)#2399
Conversation
Signed-off-by: Oliver Koenig <okoenig@nvidia.com>
📝 WalkthroughWalkthroughUpdates the Megatron-LM git submodule pointer from commit 76a9f472a58fa054120031a8533404cd799b3f01 to commit 8f1c2f8ae53b4e3f32c0ae7f397d8b38a675eaa2. This is a metadata-only change with no behavioral modifications. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@3rdparty/Megatron-LM`:
- Line 1: The PR title/description claims a bump to uv.lock but the actual
change updates the Megatron-LM git submodule pointer; update the PR to
accurately reflect the change or adjust the commit contents: either (a) change
the PR title/body to state "update Megatron-LM submodule pointer" and include
the submodule diff referencing Megatron-LM, or (b) revert the unintended
submodule update and include the intended uv.lock changes instead; verify the
commit(s) and branch contain only the intended modifications (uv.lock or
Megatron-LM) before updating the PR.
- Line 1: This submodule update introduces breaking changes: RL artifacts now
use JSON (megatron/rl/rl_utils.py), RL training/inference switches to an
OpenAI-server style interface (deprecated flags: --langrl-inference-server-type
inplace_megatron and chat_mode), DSA indexer APIs have been refactored, and
mamba now exposes mamba_memory_ratio for KV-cache/memory partitioning; to fix,
search the codebase for imports/usages of megatron/rl/rl_utils.py and replace
pickle read/write logic with JSON serialization/deserialization, update any
command-line parsing or config handling that references
--langrl-inference-server-type or chat_mode to the new OpenAI-style inference
config (and adjust callers of the RL inference functions accordingly), audit and
update DSA-related imports/calls to the new indexer symbols, and add handling
for mamba_memory_ratio where Mamba inference is configured (expose the new
parameter in configs and ensure memory partitioning logic uses it); run RL
training/inference and DSA/mamba unit/integration tests to validate behavior
before merging.
| @@ -1 +1 @@ | |||
| Subproject commit 76a9f472a58fa054120031a8533404cd799b3f01 | |||
| Subproject commit 8f1c2f8ae53b4e3f32c0ae7f397d8b38a675eaa2 | |||
There was a problem hiding this comment.
PR description doesn't match actual changes.
The PR title and description indicate this is bumping uv.lock, but the actual change updates the Megatron-LM git submodule pointer. This inconsistency suggests either:
- The wrong files were included in this PR
- The PR description is incorrect and should reference the submodule update instead
Please verify that the intended changes are included in this PR.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@3rdparty/Megatron-LM` at line 1, The PR title/description claims a bump to
uv.lock but the actual change updates the Megatron-LM git submodule pointer;
update the PR to accurately reflect the change or adjust the commit contents:
either (a) change the PR title/body to state "update Megatron-LM submodule
pointer" and include the submodule diff referencing Megatron-LM, or (b) revert
the unintended submodule update and include the intended uv.lock changes
instead; verify the commit(s) and branch contain only the intended modifications
(uv.lock or Megatron-LM) before updating the PR.
🧩 Analysis chain
🏁 Script executed:
# Check if the submodule exists and what its current state is
git ls-files -s | grep 3rdparty/Megatron-LMRepository: NVIDIA-NeMo/Megatron-Bridge
Length of output: 141
🏁 Script executed:
# Check the .gitmodules file to understand the submodule configuration
cat .gitmodules | grep -A 3 "Megatron-LM" || echo "No matching entry found"Repository: NVIDIA-NeMo/Megatron-Bridge
Length of output: 183
🏁 Script executed:
# Check if the submodule is initialized and get its current commit
if [ -d "3rdparty/Megatron-LM/.git" ]; then
cd 3rdparty/Megatron-LM
git rev-parse HEAD
cd ../..
else
echo "Submodule not initialized or not a git directory"
fiRepository: NVIDIA-NeMo/Megatron-Bridge
Length of output: 119
🏁 Script executed:
# Fetch commit information from the remote Megatron-LM repository
git ls-remote https://github.com/NVIDIA/Megatron-LM.git refs/heads/ | head -20Repository: NVIDIA-NeMo/Megatron-Bridge
Length of output: 53
🏁 Script executed:
# Try to get commit log between the two commits using git
# First, let's fetch the actual commits
python3 << 'PYTHON_EOF'
import subprocess
import json
old_commit = "76a9f472a58fa054120031a8533404cd799b3f01"
new_commit = "8f1c2f8ae53b4e3f32c0ae7f397d8b38a675eaa2"
# Use git log with a temporary fetch to get commit info
# We'll use git for-each-ref or fetch the commits
try:
# Try to get the commits using git
result = subprocess.run(
['git', 'log', '--format=%H %s', f'{old_commit}..{new_commit}'],
capture_output=True,
text=True,
timeout=10
)
if result.returncode == 0 and result.stdout:
print("Commits found locally:")
print(result.stdout)
else:
print("Commits not found locally, will need to fetch from remote")
print(f"Old commit: {old_commit}")
print(f"New commit: {new_commit}")
except Exception as e:
print(f"Error: {e}")
PYTHON_EOFRepository: NVIDIA-NeMo/Megatron-Bridge
Length of output: 234
🏁 Script executed:
# Try initializing the submodule to check out the commits
cd 3rdparty/Megatron-LM 2>/dev/null || {
git submodule update --init 3rdparty/Megatron-LM
cd 3rdparty/Megatron-LM
}
if [ -d ".git" ] || [ -f ".git" ]; then
OLD_COMMIT="76a9f472a58fa054120031a8533404cd799b3f01"
NEW_COMMIT="8f1c2f8ae53b4e3f32c0ae7f397d8b38a675eaa2"
echo "=== Commits included in this submodule update ==="
git log --oneline --no-merges "${OLD_COMMIT}..${NEW_COMMIT}" 2>/dev/null | head -20
echo ""
echo "=== Summary of changes (first 30 files) ==="
git diff --stat "${OLD_COMMIT}..${NEW_COMMIT}" 2>/dev/null | head -30
else
echo "Submodule still not initialized"
fiRepository: NVIDIA-NeMo/Megatron-Bridge
Length of output: 102
🏁 Script executed:
# Fetch commit information from GitHub API
curl -s "https://api.github.com/repos/NVIDIA/Megatron-LM/commits/76a9f472a58fa054120031a8533404cd799b3f01" | jq '.commit.message' 2>/dev/null || echo "Commit fetch failed"Repository: NVIDIA-NeMo/Megatron-Bridge
Length of output: 163
🏁 Script executed:
# Try to get comparison between the two commits
curl -s "https://api.github.com/repos/NVIDIA/Megatron-LM/compare/76a9f472a58fa054120031a8533404cd799b3f01...8f1c2f8ae53b4e3f32c0ae7f397d8b38a675eaa2" | python3 << 'PYTHON_EOF'
import json
import sys
try:
data = json.load(sys.stdin)
if 'commits' in data:
print(f"Total commits: {len(data['commits'])}")
print("\n=== Commits ===")
for commit in data['commits'][:20]: # Show first 20
print(f"{commit['sha'][:7]} {commit['commit']['message'].split(chr(10))[0]}")
if 'files' in data:
print(f"\n=== Files changed: {len(data['files'])} ===")
for f in data['files'][:30]: # Show first 30
print(f"{f['status']}: {f['filename']} ({f.get('additions', 0)} +, {f.get('deletions', 0)} -)")
except Exception as e:
print(f"Error: {e}", file=sys.stderr)
PYTHON_EOFRepository: NVIDIA-NeMo/Megatron-Bridge
Length of output: 119
🏁 Script executed:
# Fetch comparison between the two commits with better error handling
curl -s -H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/NVIDIA/Megatron-LM/compare/76a9f472a58fa054120031a8533404cd799b3f01...8f1c2f8ae53b4e3f32c0ae7f397d8b38a675eaa2" \
| python3 -c "
import json
import sys
try:
data = json.load(sys.stdin)
if 'message' in data:
print(f'Error: {data[\"message\"]}')
elif 'commits' in data:
print(f'Total commits: {len(data[\"commits\"])}')
print()
for commit in data['commits'][:30]:
msg = commit['commit']['message'].split('\n')[0]
print(f'{commit[\"sha\"][:7]} {msg}')
else:
print('No commits field in response')
print(json.dumps(data, indent=2)[:500])
except json.JSONDecodeError as e:
print(f'JSON Error: {e}')
except Exception as e:
print(f'Error: {e}')
"Repository: NVIDIA-NeMo/Megatron-Bridge
Length of output: 739
🌐 Web query:
Megatron-LM commits 76a9f472a58fa054120031a8533404cd799b3f01 8f1c2f8ae53b4e3f32c0ae7f397d8b38a675eaa2 changes breaking
💡 Result:
Between 76a9f47 and 8f1c2f8, the changes most likely to be breaking are:
-
RL training/inference interface switch to the “Inference OpenAI API server”: the RL example command line removes
--langrl-inference-server-type inplace_megatron, and RL environment/agent configs drop “chat-mode” style knobs likechat_mode/assistant_suffix(and related prompt formatting paths), so existing RL configs/scripts using those fields/flags will fail or behave differently. [1] -
RL artifacts format change (pickle → JSON):
megatron/rl/rl_utils.pystops writing*.pklfiles in binary viapickle.dump(...)and instead writes*.json(text) viajson.dump([[r.model_dump() ...]]). Any downstream tooling expecting pickle files or Python-object roundtrips will break. [2] -
Experimental DSA attention API refactor: “Decouple topk and loss from DSA Indexer” adds new helper functions (e.g.,
fused_qk_topk_naive,FusedDSAIndexerLoss) and removes/relocates prior logic (e.g.,_compute_index_scoresas previously structured), which can break any code importing/depending on those internal symbols/behaviors. [3] -
Inference dynamic batching behavior/args (hybrid Mamba models): adds
InferenceConfig.mamba_memory_ratioand a new CLI flag--inference-dynamic-batching-mamba-memory-ratio; enabling it changes how KV-cache vs Mamba-state memory is partitioned and can clampmax_requests, which can alter throughput/memory assumptions for existing deployments. [4]
Sources: [1] commit 7a8f305 patch, [2] commit 8f1c2f8 diff, [3] commit b890099 patch, [4] commit 4beb8ca patch.
Review and integrate breaking changes from this submodule update carefully.
This submodule update includes 11 commits with several breaking changes that require code updates and testing:
- RL artifacts format migration: RL utilities now write JSON instead of pickle files (
megatron/rl/rl_utils.py). Any code reading pickle artifacts or expecting Python object serialization will break. - RL training/inference interface change: The update switches to the OpenAI API server inference model. Existing RL configs and command-line arguments (e.g.,
--langrl-inference-server-type inplace_megatron,chat_mode) are no longer supported. - DSA attention API refactor: Internal DSA indexer symbols and behaviors have changed. Code importing from DSA modules may need updates.
- Mamba inference dynamic batching: New
mamba_memory_ratioparameter controls KV-cache vs Mamba-state memory partitioning, affecting throughput and memory allocation on Mamba-based deployments.
Verify that the Megatron-Bridge codebase is compatible with these changes before merging, particularly in RL training/inference paths and any code depending on Megatron-LM's internal APIs.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@3rdparty/Megatron-LM` at line 1, This submodule update introduces breaking
changes: RL artifacts now use JSON (megatron/rl/rl_utils.py), RL
training/inference switches to an OpenAI-server style interface (deprecated
flags: --langrl-inference-server-type inplace_megatron and chat_mode), DSA
indexer APIs have been refactored, and mamba now exposes mamba_memory_ratio for
KV-cache/memory partitioning; to fix, search the codebase for imports/usages of
megatron/rl/rl_utils.py and replace pickle read/write logic with JSON
serialization/deserialization, update any command-line parsing or config
handling that references --langrl-inference-server-type or chat_mode to the new
OpenAI-style inference config (and adjust callers of the RL inference functions
accordingly), audit and update DSA-related imports/calls to the new indexer
symbols, and add handling for mamba_memory_ratio where Mamba inference is
configured (expose the new parameter in configs and ensure memory partitioning
logic uses it); run RL training/inference and DSA/mamba unit/integration tests
to validate behavior before merging.
Signed-off-by: Oliver Koenig <okoenig@nvidia.com> Co-authored-by: maanug-nv <109391026+maanug-nv@users.noreply.github.com>
🚀 PR to bump
uv.lockinmain.📝 Please remember the following to-do's before merge:
🙏 Please merge this PR only if the CI workflow completed successfully.
Summary by CodeRabbit