Repository navigation
Restore jax_use_shardy_partitioner in conftest.py and configure it in train_compile.py. - #6403
Open
copybara-service[bot] wants to merge 1 commit into
Open
copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
copybara-service
Bot
requested review from
A9isha,
NuojCheng,
RissyRan,
SurbhiJainUSC,
abhinavclemson,
aireenmei,
bvandermoon,
darisoy,
dipannita08,
gagika,
gobbleturk,
hengtaoguo,
igorts-git,
jiangjy1982,
khatwanimohit,
shralex,
shuningjin and
xibinliu
as code owners
November 17, 2026 18:52
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
copybara-service
Bot
force-pushed
the
test_1023876587
branch
from
November 17, 2026 19:14
ee193ff to
20a33a7
Compare
PiperOrigin-RevId: 1023876587
copybara-service
Bot
force-pushed
the
test_1023876587
branch
from
November 17, 2026 19:33
20a33a7 to
92b1d43
Compare
This branch has not been deployed
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.
Restore
jax_use_shardy_partitionerinconftest.pyand configure it intrain_compile.py.Description
In
cpu-integrationunderpytest-xdist(e.g.TPU Docker Images PipelineRun44139847036, job134250571837),tests/unit/train_compile_test.py::TrainCompile::test_moe_deepseek_unscanned_bf16crashes the worker withFatal Python error: Abortedinsidelowered.compile()when scheduled on the samexdistworker immediately aftertests/integration/train_tests.py::TrainTests::test_base_model_shardy_false:TrainCompile::test_moe_deepseek_unscanned_bf16fromcpu-unitintocpu-integration, placing it in the samepytest-xdistpool asTrainTests::test_base_model_shardy_false.test_base_model_shardy_falseinvokestrain.main(..., "shardy=False"), which setsjax.config.update("jax_use_shardy_partitioner", False)globally in the worker process (train.py:1632).jax_default_prng_impl,jax_remove_size_one_mesh_axis_from_type, andLIBTPU_INIT_ARGS,jax_use_shardy_partitionerwas not restored bytests/conftest.py(added in PR Restore JAX PRNG and LIBTPU_INIT_ARGS via pytest fixtures in conftest.py #6227), andtrain_compile.pydid not calljax.config.update("jax_use_shardy_partitioner", config.shardy).This change:
jax_use_shardy_partitionerin_restore_jax_prng_and_libtpu_env()intests/conftest.py.jax.config.update("jax_use_shardy_partitioner", config.shardy)intrain_compile.py(get_topology_meshandmain), matchingtrain.pyanddecode.py.tests/unit/marker_propagation_test.py(test_restore_jax_use_shardy_partitioner) andtests/unit/train_compile_test.py(test_get_topology_mesh_updates_shardy_partitioner).Tests
pytest tests/unit/marker_propagation_test.py -k test_restore_jax_use_shardy_partitionerpytest tests/unit/train_compile_test.py -k test_get_topology_mesh_updates_shardy_partitionerblaze test //third_party/py/maxtext/tests:train_compile_google_testChecklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.