Skip to content

Fix MTC NNX checkpoint restore#4322

Merged
copybara-service[bot] merged 1 commit into
mainfrom
sujinesh/fix-emergency-nnx-restore
Jul 2, 2026
Merged

Fix MTC NNX checkpoint restore#4322
copybara-service[bot] merged 1 commit into
mainfrom
sujinesh/fix-emergency-nnx-restore

Conversation

@SujeethJinesh

Copy link
Copy Markdown
Collaborator

Description

Since the recent MaxText move to NNX, restoration from emergency checkpointers (like Multi-Tiered Checkpointing) don't work in the intended way. This fixes it for the MTC path.

Without this fix, restoration gets: ValueError: colocated restore produced a pytree structure that does not match the caller template structure. Got: PyTreeDef({'opt_state': ...

FIXES: b/530279521

Tests

Tested on internal cluster (details in b/529621972#comment6)

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation.

@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/maxtext/common/checkpointing.py 60.00% 6 Missing ⚠️

📢 Thoughts on this report? Let us know!

@SujeethJinesh SujeethJinesh force-pushed the sujinesh/fix-emergency-nnx-restore branch from c551e47 to c9fc3a4 Compare July 1, 2026 21:57
@SujeethJinesh SujeethJinesh force-pushed the sujinesh/fix-emergency-nnx-restore branch from c9fc3a4 to 0da53c3 Compare July 1, 2026 22:07
@copybara-service copybara-service Bot merged commit ecf666f into main Jul 2, 2026
53 checks passed
@copybara-service copybara-service Bot deleted the sujinesh/fix-emergency-nnx-restore branch July 2, 2026 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants