Skip to content

Support safe_globals in padertorch.Module#166

Merged
michael-kuhlmann merged 2 commits into
fgnt:masterfrom
michael-kuhlmann:master
Aug 13, 2025
Merged

Support safe_globals in padertorch.Module#166
michael-kuhlmann merged 2 commits into
fgnt:masterfrom
michael-kuhlmann:master

Conversation

@michael-kuhlmann

Copy link
Copy Markdown
Contributor

No description provided.

Safely call padertorch.Module.from_storage without having to set weights_only=False
In some cases, loading checkpoints with safe_globals will not work.

Example: np.core was renamed to np._core in numpy>2.0.
Checkpoints that were saved with numpy<2.0 cannot be loaded in an environment with numpy>=2.0.
In that case, the only way to load the checkpoint is to set weights_only=False.
@michael-kuhlmann michael-kuhlmann requested a review from TCord August 13, 2025 09:02
@michael-kuhlmann michael-kuhlmann merged commit 5d00ac5 into fgnt:master Aug 13, 2025
7 checks passed
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.

2 participants