fix(async_ckpt): import inspect in async_utils on core_r0.17.0#4597
Merged
ko3n1g merged 1 commit intoMay 4, 2026
Merged
Conversation
The NVRx backport (NVIDIA#4453) introduced inspect.signature() calls in init_persistent_async_worker but did not add the corresponding `import inspect`. The import existed on main from an earlier change so the backport diff did not surface it; on core_r0.17.0 it was missing, causing a NameError when the persistent async checkpoint worker is initialized. Signed-off-by: oliver könig <okoenig@nvidia.com>
Contributor
Author
|
/ok to test |
ko3n1g
added a commit
that referenced
this pull request
May 5, 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.
Claude summary
What
Add the missing
import inspecttomegatron/training/async_utils.pyoncore_r0.17.0.Why
init_persistent_async_workercallsinspect.signature(...)in three places (around lines 74, 84, 99) butinspectis not imported on this branch, causing a hard failure duringinitialize_megatron:The
inspect.signature(...)usage was introduced by the NVRx async checkpoint compatibility backport (#4453, commitbb8e34cb86). Onmain,import inspectwas already present from an earlier change, so the backport diff didn't surface the missing import — oncore_r0.17.0it slipped through.Repro
Any test that exercises the persistent async checkpoint worker on
core_r0.17.0, e.g.moe/gpt3_moe_mcore_te_tp4_ep2_etp2_pp2_resume_torch_dist_dist_optimizer— see https://github.com/NVIDIA/Megatron-LM/actions/runs/24986791266/job/73546733227.Fix
One-line change: add
import inspectto the imports.