From 956e067fc5c34d143fa7dc938c5b6c375fe973fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?oliver=20k=C3=B6nig?= Date: Thu, 4 Jun 2026 09:49:19 +0000 Subject: [PATCH] test(elastification): quarantine flaky test_gumbel_determinism as flaky_in_dev MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test_gumbel_determinism asserts two FlextronRouter instances produce bit-identical Gumbel-softmax logits, but forward() draws hard_sample from Python's un-seeded global random, outside the Gumbel torch.manual_seed. The two routers intermittently disagree on the hard/soft branch, failing the atol=0,rtol=0 assert (~0.4% per run, any rank). Quarantine via flaky_in_dev to keep the default pipeline green; root cause and proposed fix tracked in #5155. Co-Authored-By: Claude Opus 4.8 (1M context) Signed-off-by: oliver könig --- .../elastification/test_hybrid_flex_router.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/unit_tests/elastification/test_hybrid_flex_router.py b/tests/unit_tests/elastification/test_hybrid_flex_router.py index a5720e92dc4..ae2889aa8be 100644 --- a/tests/unit_tests/elastification/test_hybrid_flex_router.py +++ b/tests/unit_tests/elastification/test_hybrid_flex_router.py @@ -157,9 +157,17 @@ def test_emb_output_shape_matches_choice_count(self): assert logits.numel() == len(config.emb_int_list) assert choice in config.emb_int_list + @pytest.mark.flaky_in_dev def test_gumbel_determinism(self): """Two routers at the same config + iteration + fwd_pass_count should - produce identical Gumbel-softmax samples.""" + produce identical Gumbel-softmax samples. + + Quarantined as flaky_in_dev (#5155): ``FlextronRouter.forward`` draws + ``hard_sample`` from Python's un-seeded global ``random``, which is not + covered by the Gumbel ``torch.manual_seed``, so the two routers + intermittently disagree on the hard/soft branch and the bit-exact + ``assert_close`` fails. + """ config = _router_config() config.curr_iteration = 0