Adapt inspect_checkpoint.py for Automated Ckpt Validation Pipeline (Agent Integration)#4567
Open
olufiyin19 wants to merge 2 commits into
Open
Adapt inspect_checkpoint.py for Automated Ckpt Validation Pipeline (Agent Integration)#4567olufiyin19 wants to merge 2 commits into
olufiyin19 wants to merge 2 commits into
Conversation
olufiyin19
requested review from
A9isha,
NuojCheng,
RissyRan,
SurbhiJainUSC,
abhinavclemson,
aireenmei,
bvandermoon,
gagika,
gobbleturk,
hengtaoguo,
jiangjy1982,
khatwanimohit,
richjames0,
shralex and
vipannalla
as code owners
July 22, 2026 18:23
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
olufiyin19
requested review from
darisoy,
dipannita08,
huytransformer,
igorts-git,
suexu1025 and
xibinliu
as code owners
July 22, 2026 18:23
… models (Deepseekv4)
olufiyin19
force-pushed
the
feat/legacy-inspect-checkpoint-nnx-support
branch
from
July 22, 2026 18:32
0453b56 to
c31d3ae
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
shuningjin
reviewed
Jul 22, 2026
Collaborator
There was a problem hiding this comment.
Thanks for adding the support for inspecting NNX checkpoint! By comparing the code with checkpoint_conversion/inspect_checkpoint.py, it seems the change is relatively safe (diff). Would you consider directly incorporating to that script for broad use?
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
This PR modifies
inspect_checkpoint.pyto introduce native NNX architecture support, while preserving Linen compatibility as a fallback. The previous coreinspect_checkpoint.pyutility only supported Linen-based models. As our automated validation pipeline transitions to an NNX-first architecture, a way to inspect checkpoints against NNX abstract models is required.create_nnx_abstract_modelandflax.nnx.splitto dynamically generate abstract parameters for NNX models whenenable_nnx=Trueis passed in the config.Tests
1. Manually verified that passing `enable_nnx=True` successfully initializes the NNX abstract model and accurately resolves the params.params. key structure.
Command:
2. Verified that falling back to older configs successfully routes to the legacy Linen Transformer initialization without failure.
Command:
Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.