Add default rule constants to types.py and add base.yml parity test - #4985
Open
bvandermoon wants to merge 1 commit into
Open
Add default rule constants to types.py and add base.yml parity test#4985bvandermoon wants to merge 1 commit into
bvandermoon wants to merge 1 commit into
Conversation
bvandermoon
requested review from
A9isha,
NuojCheng,
RissyRan,
SurbhiJainUSC,
abhinavclemson,
aireenmei,
darisoy,
dipannita08,
gagika,
gobbleturk,
hengtaoguo,
huytransformer,
igorts-git,
jiangjy1982,
khatwanimohit,
richjames0,
shralex,
shuningjin,
vipannalla and
xibinliu
as code owners
August 24, 2026 22:48
There was a problem hiding this comment.
Code Review
This pull request updates default configuration values and structures in types.py, including extracting default mesh axes, data sharding, and logical axis rules into constants, and updates related unit tests. Feedback includes moving an inline import to the top of the file to comply with PEP 8 and removing a redundant duplicate call to os.environ.pop.
bvandermoon
force-pushed
the
bvandermoon-configs
branch
from
August 24, 2026 22:55
79b8fc4 to
064bdda
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
NuojCheng
approved these changes
Aug 24, 2026
NuojCheng
left a comment
Collaborator
There was a problem hiding this comment.
Nice fix! Thank you Branden
SurbhiJainUSC
approved these changes
Aug 25, 2026
bvandermoon
force-pushed
the
bvandermoon-configs
branch
from
August 25, 2026 20:41
064bdda to
c45c016
Compare
bvandermoon
force-pushed
the
bvandermoon-configs
branch
from
August 25, 2026 22:35
c45c016 to
e6fcf14
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.
Description
Currently, MaxText uses a dual-configuration system where base.yml supplies baseline dictionary keys and types.py defines the Pydantic schema. This causes duplicate maintenance whenever a config flag is added or modified.
This PR is Phase 1 of consolidating configuration management to use types.py as the single source of truth. This is making
base.ymlandtypes.pyfully consistent with each other.Key Changes
Tests
python3 -m unittest tests/unit/pyconfig_test.py -k test_base_yml_types_paritypytest tests/unit/configs_test.pypytest tests/unit/configs_value_test.pyChecklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.