Repository navigation
fix(checkpoint): save tuned modules nested in pipeline components - #42
Merged
lslusarczyk merged 3 commits intoOct 29, 2026
Merged
lslusarczyk merged 3 commits into
lslusarczyk merged 3 commits into
Conversation
lslusarczyk
force-pushed
the
fix/checkpoint-components-with-tuned-modules
branch
from
October 23, 2026 10:29
c0d3894 to
ad1c11c
Compare
lslusarczyk
force-pushed
the
fix/checkpoint-components-with-tuned-modules
branch
3 times, most recently
from
October 28, 2026 11:33
37712e2 to
50e3d28
Compare
`save` stored only pipeline attributes that are tuned modules. A tuned module inside a pipeline component was left out, and save failed with "No tuned modules found". Each tuned module is now stored under its dotted path, e.g. `vae.decoder`. Modules that are not tuned are not saved. A module that the pipeline holds under several paths is saved once and restored as one module. Older checkpoints with one entry per alias load the module once. `save` warns about tuned modules it does not save. A module held in a plain list, dict or object is still not saved. Follows ai-dynamo/aitune#108: one walk maps every module path, and load reuses it. A path to a non-module attribute is still reported as not a module. Co-authored-by: Konrad Nowicki <knowicki@nvidia.com> Signed-off-by: Łukasz Ślusarczyk <lukasz.slusarczyk@intel.com>
lslusarczyk
force-pushed
the
fix/checkpoint-components-with-tuned-modules
branch
from
October 28, 2026 13:27
50e3d28 to
9f592b6
Compare
lslusarczyk
marked this pull request as ready for review
October 28, 2026 13:27
lslusarczyk
enabled auto-merge (squash)
October 29, 2026 08:13
PatKamin
reviewed
Oct 29, 2026
A module reached again, e.g. through an alias or a module that holds itself, keeps its path but its children are not walked again. A module that holds itself no longer causes a RecursionError. Signed-off-by: Łukasz Ślusarczyk <lukasz.slusarczyk@intel.com>
PatKamin
approved these changes
Oct 29, 2026
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.
savenow stores tuned modules nested inside pipeline components.savestored only pipeline attributes that are tuned modules.A tuned module inside a component, such as
vae.decoder, was left out.Save then failed with "No tuned modules found".
Each tuned module is stored under its dotted path, e.g.
vae.decoder.Modules that are not tuned are not saved, so the checkpoint does not carry the weights of the whole component.
A module that the pipeline holds under several paths is saved once and restored as one module.
Older checkpoints with one entry per alias load the module once.
savewarns about tuned modules it does not save.A module held in a plain list, dict or object is still not saved.
A TODO marks the search to extend, the same way
ModuleInspectorwalks containers.The code follows ai-dynamo/aitune#108, which merged Konrad Nowicki's fix.
One walk maps every module path, and load restores through the same map.
A path to a non-module attribute is still reported as not a module.
Tests tune real modules on XPU, save, load into a fresh pipeline, and check the result.