fix(ci): resolve CI failures for PR #4501 sharding and Tunix adapter rollout regression - #4689
Open
copybara-service[bot] wants to merge 1 commit into
Open
fix(ci): resolve CI failures for PR #4501 sharding and Tunix adapter rollout regression#4689copybara-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,
huytransformer,
igorts-git,
jiangjy1982,
khatwanimohit,
parambole,
richjames0,
shralex,
shuningjin,
vipannalla and
xibinliu
as code owners
July 31, 2026 10:28
copybara-service
Bot
force-pushed
the
test_957035527
branch
3 times, most recently
from
July 31, 2026 10:53
2657a93 to
0f219b9
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
copybara-service
Bot
force-pushed
the
test_957035527
branch
4 times, most recently
from
July 31, 2026 14:21
5229448 to
3e677e0
Compare
copybara-service
Bot
force-pushed
the
test_957035527
branch
5 times, most recently
from
July 31, 2026 14:52
42d784f to
38aff74
Compare
copybara-service
Bot
force-pushed
the
test_957035527
branch
14 times, most recently
from
July 31, 2026 17:09
85c8daf to
f583668
Compare
…rollout regression This CL fixes CI test and notebook failures: 1. **Follow-up for PR #4501 (`sharding.py`):** - Scopes `PartitionSpec P()` defaulting to NNX variables (`isinstance(p_leaf, nnx.Variable)`), allowing NNX LoRA and full-weight training models to execute safely without missing-spec errors. - Standard Linen parameters remain `None` so unit tests (`test_mixed_sharding_fails`) throw an `AssertionError` on unannotated arrays as expected (`tolerance=0.5` untouched). - Keeps element counts (`p_leaf.size`) for unsharded parameter totals to preserve mixed-precision sharding validation. 2. **Fix for rollout regression (`tunix_adapter.py`):** - Resolves a regression from upstream code changes by adding a `_compat_wsc` fallback shim around `jax.lax.with_sharding_constraint` in `TunixMaxTextAdapter`. - Ensures TPU notebooks and `VllmRollout` safely fall back to `jax.sharding.reshard` when encountering explicit mesh sharding assertions. # Tests - Verified `tests/unit/maxtext_utils_test.py::TestAssertParamsSufficientlySharded` (7/7 passed with tolerance=0.5 untouched). - Verified `tests/integration/lora_e2e_nnx_test.py` (sharding validation passed across all 10 tests). # Checklist - [x] I have performed a self-review of my code. For an optional AI review, add the `gemini-review` label. - [x] I have necessary comments in my code, particularly in hard-to-understand areas. - [x] I have run end-to-end tests and provided workload details above. - [x] I have made or will make corresponding changes to the doc if needed. FUTURE_COPYBARA_INTEGRATE_REVIEW=#4501 from AI-Hypercomputer:nnx-lora-support 5b4a7de PiperOrigin-RevId: 957035527
copybara-service
Bot
force-pushed
the
test_957035527
branch
from
July 31, 2026 17:21
f583668 to
2fa5fc3
Compare
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.
fix(ci): resolve CI failures for PR #4501 sharding and Tunix adapter rollout regression
This CL fixes CI test and notebook failures:
Follow-up for PR feat(nnx): support native Flax NNX PEFT/LoRA training loop #4501 (
sharding.py):PartitionSpec P()defaulting to NNX variables (isinstance(p_leaf, nnx.Variable)), allowing NNX LoRA and full-weight training models to execute safely without missing-spec errors.Noneso unit tests (test_mixed_sharding_fails) throw anAssertionErroron unannotated arrays as expected (tolerance=0.5untouched).p_leaf.size) for unsharded parameter totals to preserve mixed-precision sharding validation.Fix for rollout regression (
tunix_adapter.py):_compat_wscfallback shim aroundjax.lax.with_sharding_constraintinTunixMaxTextAdapter.VllmRolloutsafely fall back tojax.sharding.reshardwhen encountering explicit mesh sharding assertions.Tests
tests/unit/maxtext_utils_test.py::TestAssertParamsSufficientlySharded(7/7 passed with tolerance=0.5 untouched).tests/integration/lora_e2e_nnx_test.py(sharding validation passed across all 10 tests).Checklist
gemini-reviewlabel.FUTURE_COPYBARA_INTEGRATE_REVIEW=#4501 from AI-Hypercomputer:nnx-lora-support 5b4a7de