nvidia-nemo/megatron-bridge/verl-e2e-testing
Claude Code and agent skill by nvidia-nemo/megatron-bridge
- community
Checking that the SKILL.md file is still in the repository.
External verl end-to-end validation workflow for Megatron-Bridge changes. Covers running a small verl Megatron backend job from a Bridge checkout, choosing LoRA/DDP plus optional save/resume and parallelism variants, setting PYTHONPATH so verl imports the local Bridge tree, and reporting pass/fail evidence.
Install
npx vskill@latest install nvidia-nemo/megatron-bridge/verl-e2e-testingSKILL.md
The same SKILL.md was published earlier as nvidia-nemo/megatron-bridge/verl-e2e-testing.
verl E2E Testing
Validate a Megatron-Bridge change through verl's Megatron backend. This catches integration issues that Bridge-only tests miss: provider/configuration finalization, HF import through Bridge, PEFT wrapping, DDP wrapping, optimizer setup, rollout/ref wiring, and checkpoint ownership by an external RL loop.
Use this as an external compatibility smoke test after the relevant Bridge unit and functional tests are green.
This is not a replacement for Bridge correctness tests. The default verl run proves that the changed Bridge path can survive an external RL training loop; numerical parity, import/export fidelity, and feature-specific behavior still come from focused Bridge tests.
Scope
Think in coverage levels. Start with Level 0 and add only the levels justified by the change.
| Level | Required when | What it proves | |
|---|---|---|---|
| 0: LoRA + DDP smoke | Any Bridge change that claims verl compatibility | verl can import the local Bridge checkout, apply PEFT, wrap with Megatron DDP, build optimizer state, run rollout/ref/critic wiring, and finish one training step | |
| 1: Save/resume | PEFT, checkpointing, HF export, adapter export, optimizer state, or resume behavior changed | verl-owned checkpoint scheduling can save and reload Bridge-built model state | |
| 2: Parallelism stress | Provider finalization, mpu-derived settings, TP/PP/CP/EP, sequence parallel, or dispatcher behavior changed | provider settings remain correct under non-trivial Megatron parallel state | |
| 3: Optional Megatron-FSDP | Only when downstream explicitly asks for verl Megatron-FSDP coverage or the change directly touches that integration path | the same provider works when verl selects Megatron-FSDP instead of DDP | |
| 4: Feature-specific e2e | The change depends on runtime behavior not exercised by the default text-only smoke | the requested feature is activated by a targeted verl command or script | |
| 5: Convergence / learning signal | Optimizer, scheduler, loss, reward, PEFT trainability, gradient flow, or training stability changed | metrics move in the expected direction over a short run and do not silently produce zero/NaN/unstable updates |
The default Level 0 target is a short, non-vanilla Bridge run in verl with LoRA enabled and Megatron DDP selected:
This is intentionally small. It exercises the Bridge-facing path in verl without making Megatron-Bridge own rollout scheduling, reward handling, optimizer scheduling, or checkpoint orchestration.
Level 0 is not a convergence test. It only proves the training loop can complete one update. Use Level 5 when the question is whether the run shows a learning signal under verl.
Megatron-FSDP is not part of the default validation expected for current provider compatibility work. Run it only for Level 3 coverage when FSDP is explicitly in scope:
Repos
Use explicit repo variables. Do not rely on an installed megatron-bridge wheel; the purpose is to test the current Bridge checkout.
Use the upstream verl repository as the default source:
If a checkout is not already available, clone it next to the Bridge checkout or into the site's standard workspace:
Before running, record both states:
If testing on a remote GPU machine, sync the exact local changes first. Do not reset or overwrite unrelated changes in either tree.
Verify that Python imports the checkout under test:
The printed path must live under $BRIDGE_REPO/src. If it points at site-packages, fix PYTHONPATH before trusting any result.
When running against an existing Ray cluster, the driver import is not enough. Ray workers may not inherit the shell PYTHONPATH, and the run can fail later with ModuleNotFoundError: No module named 'megatron.bridge' even though the driver import passed. Verify a worker import:
If the worker import fails, pass the checkout path through Ray's runtime environment when launching the wrapper:
If this import fails before Bridge-managed construction, fix the runtime environment first. The official verl image may not contain every Bridge dependency; for example, Bridge imports modelopt through AutoBridge, so a missing nvidia-modelopt can fail the smoke before verl exercises the changed path:
Treat ad-hoc installs as container setup evidence, not repository changes. If the image lacks uv, run focused Bridge unit tests in a Bridge development environment instead of forcing them through the verl container.
Checkpoint Or Config Choice
Prefer the smallest representative HF checkpoint or local converted checkpoint that exercises the changed Bridge path. Start small before testing larger variants.
If there is no practical checkpoint for the changed path, use verl's dummy-config path with a minimal HF config:
Report dummy-config results carefully: they validate construction and training mechanics, not pretrained weight compatibility.
The default text-only smoke does not activate every feature. If the change depends on a specialized runtime path, use the closest maintained verl example or project script that actually enables that path, and record the exact environment variables and Hydra overrides.
For distributed behavior, a Level 0 run with all parallel sizes set to 1 is not enough evidence. Add Level 2 coverage when the change touches tensor, pipeline, context, expert, sequence, dispatcher, or mpu-derived settings.
When a script already exists for the requested workflow, prefer it over reconstructing a long command by hand. Verify the log shows the requested RL algorithm and backend rather than inferring it from the script name.
Bridge Checks First
Run focused Bridge tests before the external verl e2e. Include any change-specific tests added by the PR.
For changes that affect import/export, also run the relevant conversion, roundtrip, or parity test from the PR.
Minimum Bridge-side evidence for a new verl-facing Bridge path:
- provider/config unit tests
- parameter mapping tests
- HF to Megatron import or roundtrip on a small checkpoint or config
- change-specific runtime or parity check when available
- this verl external-loop smoke after the above pass
verl Data Setup
verl's default Megatron smoke wrapper expects task parquet files. Prepare the default dataset once from the verl checkout if it is missing:
Use --local_dataset_path "$GSM8K_SOURCE_DIR" only when that raw local dataset path actually exists. Otherwise let datasets fetch openai/gsm8k.
Set explicit paths when running in a container or shared filesystem:
The wrapper also enables a reward model by default. Ensure the default reward model path exists, or set:
For a Level 0 rule-reward smoke, it is acceptable to disable the reward-model rollout when no local reward model is available:
Report this as a limitation; it still tests Bridge actor/ref/critic construction, LoRA, DDP wrapping, rollout, and one training update, but not reward-model serving.
Minimal verl Run
Use verl's maintained wrapper, or the closest maintained example script for the requested workflow, rather than constructing a long Hydra command manually:
Use MODEL_ID when the checkpoint is available through the wrapper's default cache layout. Add MODEL_PATH=/path/to/local/hf/model only when testing a local or converted checkpoint.
When $HOME is small or shared slowly, put HF caches and downloaded checkpoints on a larger shared or node-local scratch path and pass MODEL_PATH explicitly. Pre-download large models once in the same container environment to avoid Ray workers racing the cache:
Capture logs to a file for review:
Prefer a saved log over a pasted terminal excerpt in PR descriptions.
Do not trust the command shape alone. Inspect the log or resolved config to confirm the requested algorithm, rollout backend, non-vanilla Bridge path, response length, checkpoint policy, and parallelism settings are actually active.
For time-limited smoke runs where vLLM CUDA graph capture dominates setup and the goal is Bridge provider validation, it is acceptable to add:
Report this override as a limitation. It still validates Bridge import, HF import, LoRA, Megatron DDP, rollout wiring, and one training update, but not vLLM CUDA graph capture.
Save/Resume Coverage
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/verl-e2e-testing/SKILL.md
Popularity
- Repository stars
- 901
- Repository forks
- 485
- 7-day trend score
- 34
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 6 Sep 2026, 2 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/nvidia-nemo/megatron-bridge/verl-e2e-testing)