Skip to content

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

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_944311354
Jul 22, 2026
Merged

Add checkpoint_context.py to map flat orbax v0 flags to Orbax v1 Context.#4381
copybara-service[bot] merged 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 95.74468% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/maxtext/common/checkpoint_context.py 95.74% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@copybara-service
copybara-service Bot force-pushed the test_944311354 branch 3 times, most recently from c399a94 to 14022be Compare July 8, 2026 20:32
@copybara-service
copybara-service Bot force-pushed the test_944311354 branch 2 times, most recently from 5f13072 to fd15e33 Compare July 16, 2026 16:28
@copybara-service
copybara-service Bot force-pushed the test_944311354 branch 3 times, most recently from 78a299f to cfad7b4 Compare July 22, 2026 18:26
…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: 952300152
@copybara-service
copybara-service Bot merged commit de5e210 into main Jul 22, 2026
1 check passed
@copybara-service
copybara-service Bot deleted the test_944311354 branch July 22, 2026 20:30
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