Skip to content

Add checkpoint_context.py to map flat orbax v0 flags to Orbax v1 Context.#4381

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_944311354
Open

Add checkpoint_context.py to map flat orbax v0 flags to Orbax v1 Context.#4381
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_944311354

Conversation

@copybara-service

Copy link
Copy Markdown
Contributor

Add checkpoint_context.py to map flat orbax v0 flags to Orbax v1 Context.

This new module provides functions to build Orbax v1 Context, SaveDecisionPolicy, and PreservationPolicy objects based on MaxText's checkpoint configuration flags. It centralizes the logic for configuring Orbax v1, replacing various scattered v0 Orbax constructs previously used in MaxText. Unit tests are included to verify the correct mapping of flags to Orbax v1 options.

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.78313% with 97 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/maxtext/common/grain_utility.py 62.70% 78 Missing and 13 partials ⚠️
src/maxtext/common/checkpointing.py 77.77% 4 Missing ⚠️
src/maxtext/common/checkpoint_context.py 95.34% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@copybara-service copybara-service Bot force-pushed the test_944311354 branch 2 times, most recently from 4303895 to c399a94 Compare July 8, 2026 20:30
…ext.

This new module provides functions to build Orbax v1 Context, SaveDecisionPolicy, and PreservationPolicy objects based on MaxText's checkpoint configuration flags. It centralizes the logic for configuring Orbax v1, replacing various scattered v0 Orbax constructs previously used in MaxText. Unit tests are included to verify the correct mapping of flags to Orbax v1 options.

PiperOrigin-RevId: 944311354
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant