Megatron-LM icon indicating copy to clipboard operation
Megatron-LM copied to clipboard

🐛 CI failure: tests/functional_tests/python_test_utils/test_pretraining_regular_pipeline.py::test_regular_pipeline [mimo_vlm_pretrain_convergence_tp1_pp1_cp1_dp8_seq_packing]

Open balasaajay opened this issue 6 months ago • 1 comments

Describe the bug

CI test tests/functional_tests/python_test_utils/test_pretraining_regular_pipeline.py::test_regular_pipeline for mimo_vlm_pretrain_convergence_tp1_pp1_cp1_dp8_seq_packing failed in job mimo/mimo_vlm_pretrain_convergence_tp1_pp1_cp1_dp8_seq_packing - latest on the iteration-time metric. The other metrics (lm loss, num-zeros, mem-allocated-bytes, mem-max-allocated-bytes) all PASSED — only the wall-clock iteration-time ApproximateTest(atol=0, rtol=0.05) is tripping. The failure repeated on all three retry attempts in this run.

This appears to be a chronic flake: golden values for this test were already refreshed once on PR #4611 (commit abdc055) and the test still fails because per-step iteration-time on the CI host is more variable than the global rtol=0.05 allows (e.g. step 2 actual 15.87s vs golden 9.37s, step 4 actual 2.19s vs golden 2.51s).

Tag the @mcore-oncall to get oncall's attention to this issue.

Failing run

Field Value
PR #4611: chore: Update Docker image version to 26.04-py3
Run 25416016966
Job mimo/mimo_vlm_pretrain_convergence_tp1_pp1_cp1_dp8_seq_packing - latest

Error

ERROR    tests.functional_tests.python_test_utils.common:common.py:263 Approximate comparison of iteration-time: FAILED
INFO     tests.functional_tests.python_test_utils.common:common.py:263 DETERMINISTIC test for metric lm loss: PASSED
INFO     tests.functional_tests.python_test_utils.common:common.py:263 APPROXIMATE test for metric lm loss: PASSED
INFO     tests.functional_tests.python_test_utils.common:common.py:263 DETERMINISTIC test for metric num-zeros: PASSED
INFO     tests.functional_tests.python_test_utils.common:common.py:263 APPROXIMATE test for metric num-zeros: PASSED
INFO     tests.functional_tests.python_test_utils.common:common.py:263 APPROXIMATE test for metric mem-allocated-bytes: PASSED
INFO     tests.functional_tests.python_test_utils.common:common.py:263 APPROXIMATE test for metric mem-max-allocated-bytes: PASSED

=================================== FAILURES ===================================
____________________________ test_regular_pipeline _____________________________

golden_values = {'iteration-time': Values (1,100,1): (1, nan), (2, 9.3743), (3, 0.903), (4, 2.50665), (5, 0.90051), (6, 0.93025), ...}
actual_values = {'iteration-time': Values (1,100,1): (1, nan), (2, 15.87007), (3, 0.86351), (4, 2.19113), (5, 0.85531), (6, 0.85478), ...}
model_config_path = './tests/functional_tests/test_cases/mimo/mimo_vlm_pretrain_convergence_tp1_pp1_cp1_dp8_seq_packing/model_config.yaml'
checks = {'iteration-time': [ApproximateTest(atol=0, rtol=0.05)], ...}

    is_close = np.isclose(actual, golden, rtol=test.rtol, atol=test.atol)
E   AssertionError: The following metrics failed: iteration-time

tests/functional_tests/python_test_utils/common.py:268: AssertionError
##[error]❌ mimo_vlm_pretrain_convergence_tp1_pp1_cp1_dp8_seq_packing — FAILED (exit 1)

(Full log available at the job URL above.)

Steps/Code to reproduce bug

Re-run the failing CI job linked above, or locally inside the dev container:

pytest tests/functional_tests/python_test_utils/test_pretraining_regular_pipeline.py::test_regular_pipeline

against the mimo_vlm_pretrain_convergence_tp1_pp1_cp1_dp8_seq_packing test case.

Suggested next steps

The iteration-time rtol of 0.05 (defined in CHECK_THRESHOLDS in tests/functional_tests/python_test_utils/test_pretraining_regular_pipeline.py) appears too tight for this short-running test on shared CI hardware. Options:

  1. Drop iteration-time from this test's METRICS list in tests/functional_tests/test_cases/mimo/mimo_vlm_pretrain_convergence_tp1_pp1_cp1_dp8_seq_packing/model_config.yaml (correctness is still covered by lm loss, num-zeros, and the memory metrics).
  2. Allow per-test override of iteration-time tolerance.
  3. Make the metric median-based rather than per-step np.isclose.

Additional context

Triaged automatically via /create-issue. The mimo_vlm_pretrain_convergence_tp1_pp1_cp1_dp8_seq_packing/model_config.yaml was last touched by @mehraakash (commit 0e19bf11, "Add CP + Sequence Packing support for Mimo (#2135)").

balasaajay avatar May 06 '26 19:05 balasaajay

Follow-up: a sister mimo VLM test now also fails on PR #4611, with a different symptom.

mimo/mimo_vlm_pretrain_convergence_tp1_pp1_cp2_dp8 (the cp2_dp8 variant, no seq-packing) was cancelled in run 25459576162 after exceeding the 1h GitHub Actions job timeout — job 74706395546. Started 21:31:28Z, cancelled 22:31:44Z (exactly 1h, conclusion cancelled).

Important difference from this issue's seq_packing failure: the test correctness checks all PASS for this variant, including iteration-time. The job is being killed by the wall-clock budget, not by an assertion failure.

Field Value
Job mimo/mimo_vlm_pretrain_convergence_tp1_pp1_cp2_dp8 - latest
Conclusion cancelled (1h job timeout)
Repeats configured N_REPEAT=5
Repeats completed 4 of 5 (all PASSED on all metrics)
Repeat 5 status started 22:26:25Z, cancelled mid-training at 22:31:41Z

Per-repeat timing

repeat start (UTC) finished (UTC) duration
setup/build 21:31:28 21:59:46 ~28 min
repeat 1 21:59:46 22:06:51 ~7.1 min — PASSED
repeat 2 22:06:51 22:13:24 ~6.5 min — PASSED
repeat 3 22:13:24 22:19:43 ~6.3 min — PASSED
repeat 4 22:19:43 22:26:06 ~6.4 min — PASSED
repeat 5 22:26:06 (cancelled 22:31:41) killed mid-training

So setup ~28 min + 5 repeats × ~6.6 min ≈ 61 min, sitting right at the 1h cap and tipping over on any small variance.

Root cause is structural, not a regression

Unlike the seq_packing variant tracked in this issue (which fails the iteration-time rtol check), the cp2_dp8 variant is correct on every metric — it's just sized too tightly for the 1h job budget on PR runs. Options for the test owner:

  1. Lower N_REPEAT for this specific test (e.g. 5 → 3) — preferred, keeps the same correctness coverage at lower wall-clock cost.
  2. Move only this test to a longer-budget pipeline (nightly), since it doesn't fit in the 1h MR cap with current setup overhead.
  3. Investigate the ~28 min setup overhead specifically for mimo VLM (data download / vicuna_7b checkpoint pull) — this is where the budget is actually being eaten.

Mitigation already applied

To unblock PR #4611, both this cp2_dp8 variant and the seq_packing variant in the title have been moved to *-broken scopes in tests/test_utils/recipes/h100/mimo.yaml so they no longer block MR / mr-github runs. Re-enable once the budget issue is addressed.

@mehraakash — you're already assigned for the seq_packing failure; this is the sibling test in the same recipe. If you'd prefer a separate issue for the cp2_dp8 timeout I'm happy to split it out — let me know.

balasaajay avatar May 06 '26 23:05 balasaajay