Repository navigation
[graph_trainer] Fix gzip trace post-processor; skip flaky DSv3 EP numerics test - #3528
Merged
Merged
Conversation
Both GraphTrainer scheduled CI workflows were red. Default workflow: #3483 switched the profiler to write gzip-compressed traces (rank0_trace.json.gz), but cudagraph's trace post-processor -- wired into every graph_trainer run via configs.py -- still read the trace with plain open()/json.load(), which raises UnicodeDecodeError on gzip bytes. test_profiler only caught the path-suffix change because it used a dummy callback that never exercised the real post-processor, masking the actual regression. Make the post-processor read/write .json.gz via gzip, fix the stale assertion, and add a round-trip test through the real post-processor so the gzip path is covered. H100 workflow: test_moe_dsv3_aot_fx_trace_vs_eager is a flaky single-rank crash -- losses match eager bitwise for ~12 steps, then one EP rank hard-crashes. Root cause is unconfirmed (the rank traceback isn't captured under loss_compare's rank-0-only tee). Skip it to get CI green; re-enable once diagnosed.
SherlockNoMad
requested review from
IvanKobzarev,
aditvenk,
sanketpurandare,
tianyu-l,
xmfan and
yiming0416
as code owners
June 4, 2026 18:04
…er Config #3269 ("support mixed optimizers") reworked OptimizersContainer.Config: the flat name=/lr= fields were replaced by a param_groups list of ParamGroupConfig (pattern + optimizer_name + optimizer_kwargs). Update the test to the new API. This failure was previously masked by the test_profiler abort earlier in the set -eux CI script.
sanketpurandare
approved these changes
Jun 4, 2026
aditvenk
approved these changes
Jun 4, 2026
| container = OptimizersContainer( | ||
| OptimizersContainer.Config( | ||
| name="AdamW", lr=1e-3, implementation="for-loop" | ||
| param_groups=[ |
Contributor
Author
There was a problem hiding this comment.
it's needed for another test failure, updated summary to mention this.
yushangdi
approved these changes
Jun 4, 2026
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.
Why
Both GraphTrainer scheduled CI workflows were red. The workflows run their test stages under
set -eux, so the first failing command aborts the rest — which means fixing one failure unmasks the next.Default workflow — gzip trace regression (real bug, masked by a stale test)
#3483 switched the profiler to write gzip-compressed traces (
rank0_trace.json.gz), but the consumer wasn't audited._cudagraph_annotate_trace_fileincudagraph.py— attached to every graph_trainer run viaconfigs.py— still read the trace with plainopen()+json.load(), which raisesUnicodeDecodeErroron the gzip magic byte (0x8b). So any profiled run with CUDA-graph annotations would crash in the post-processor.test_profiler.pyonly flagged the path-suffix change (.json→.json.gz) because itsTestTracePostProcessorConfigtest used a dummy callback that just records the path and never exercises the real post-processor — so it masked the actual regression.Default workflow —
test_trace_module.pyoptimizer Config drift (unmasked by the fix above)Once the profiler test stopped aborting the script early, the next stage surfaced its own failure:
test_trace_module.py::TestReparametrizeOptimizer::test_titan_optimizers_containerraisedTypeError: OptimizersContainer.Config.__init__() got an unexpected keyword argument 'name'. #3269 ("support mixed optimizers") reworkedOptimizersContainer.Config: the flatname=/lr=fields were replaced by aparam_groupslist ofParamGroupConfig(pattern+optimizer_name+optimizer_kwargs). The test still used the old API.H100 workflow — flaky DSv3 MoE-EP crash
test_moe_dsv3_aot_fx_trace_vs_eagerfails as a flaky single-rank crash: aot_fx_trace losses match the eager baseline bitwise through ~step 12, then one EP rank hard-crashes (others SIGTERM). Root cause is unconfirmed — the crashing rank's traceback isn't captured because the numerics tests run throughloss_compare.py→run_train.sh --local-ranks-filter 0, which tees only rank 0. (Note: the earlier "input_splits D2H race" theory is ruled out — #3459 made that copy non-blocking intentionally, and the following blockingoutput_splitscopy fences the stream.)What
cudagraph.py: make_cudagraph_annotate_trace_fileread/write.json.gzviagzip(falls back to plain text for non-.gzpaths).test_profiler.py: fix the stale assertion and addtest_annotate_post_processor_round_trips_gzip_trace, which drives the real post-processor over a gzip trace so this path is actually covered.test_trace_module.py: updatetest_titan_optimizers_containerto the new mixed-optimizerOptimizersContainer.ConfigAPI (param_groups=[ParamGroupConfig(pattern=r".*", optimizer_name="AdamW", optimizer_kwargs={"lr": 1e-3})]).test_numerics.py:@unittest.skipthe flakytest_moe_dsv3_aot_fx_trace_vs_eagerto unblock CI, with a documented reason for re-enabling after diagnosis.Test
test_trace_module,test_precompile, precompile integration,test_bitwise_deterministic,test_sac_peak_memory).test_profiler.pypost-processor tests pass (E2E skips on CUDA < 13.1);test_titan_optimizers_containerpasses;test_moe_dsv3_aot_fx_trace_vs_eagerskips. Verified the oldopen()path raisesUnicodeDecodeErroron the gzip file and the new path reads it.pre-commitclean on all changed files.