Relax tolerances in DiLoCo test to fix TPU7x failure - #4413
Closed
hsuan-lun-chiang wants to merge 3 commits into
Closed
Relax tolerances in DiLoCo test to fix TPU7x failure#4413hsuan-lun-chiang wants to merge 3 commits into
hsuan-lun-chiang wants to merge 3 commits into
Conversation
hsuan-lun-chiang
requested review from
A9isha,
NicoGrande,
NuojCheng,
RissyRan,
SurbhiJainUSC,
abhinavclemson,
aireenmei,
bvandermoon,
darisoy,
dipannita08,
gagika,
gobbleturk,
hengtaoguo,
igorts-git,
jiangjy1982,
khatwanimohit,
parambole,
richjames0,
shralex,
suexu1025,
vipannalla and
xibinliu
as code owners
July 10, 2026 03:45
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
hsuan-lun-chiang
marked this pull request as draft
July 10, 2026 05:36
hsuan-lun-chiang
force-pushed
the
tpu7x-test-fix
branch
5 times, most recently
from
July 10, 2026 07:59
f76b312 to
452fa07
Compare
hsuan-lun-chiang
force-pushed
the
tpu7x-test-fix
branch
6 times, most recently
from
July 14, 2026 02:44
8108d58 to
94053af
Compare
hsuan-lun-chiang
force-pushed
the
tpu7x-test-fix
branch
from
July 14, 2026 05:09
9e855dd to
a890409
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.
Summary
Relax tolerances in
DiLoCoTestto fix TPU7x integration test failure caused by numerical divergence.Root Cause Analysis
The integration test
tests/integration/diloco_test.py::DiLoCoTest::test_diloco_training_simulation_with_meshwas failing on TPU7x CI. Investigation showed that TPU7x exhibits a small numerical divergence (~0.38% relative difference in loss:0.647502actual vs0.65expected) during DiLoCo training simulation. The default tolerance ofassert_trees_all_close(1e-6) was too strict for this hardware-specific divergence, leading to test failures. TPUv6e did not exhibit this divergence (yielding0.65000009).Resolution
Relaxed the tolerance parameters (
rtol=1e-2,atol=1e-2) for all threeassert_trees_all_closechecks in diloco_test.py. This allows the test to pass on TPU7x while still verifying the correctness of the training simulation.Verification
0.65000009).tpu7x-integrationjob successfully passed with the relaxed tolerances.Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.