FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Use safeloader to load checkpoint meta files by pplantinga · Pull Request #3067 · speechbrain/speechbrain · GitHub

Use safeloader to load checkpoint meta files - #3067

Merged
Adel-Moumen merged 3 commits into
speechbrain:developfrom
pplantinga:fix-ckpt-yaml-load
Aug 24, 2026
Merged

Use safeloader to load checkpoint meta files#3067
Adel-Moumen merged 3 commits into
speechbrain:developfrom
pplantinga:fix-ckpt-yaml-load

Conversation

Copy link
Copy Markdown
Collaborator

While loading checkpoints is known to be unsafe (see issue #1930), a related potential security issue is loading checkpoint meta files (usually CKPT.yaml) which is currently also unsafe, and has the potential to be slightly more surprising as all meta files in the save directory can be loaded for sorting etc., not just the target checkpoint. This adjusts the behavior so that meta files are loaded with SafeLoader, reducing the chance that a malicious meta file could be loaded without knowing.

Adopting this PR would mean that the old supported behavior of storing objects (e.g. Tensors) in the meta would be no longer supported, so we should run recipe tests and make sure no recipes depend on this. Also, this would merit a warning in the release notes and potentially a minor version marker rather than patch (i.e. 1.2 rather than 1.1.1).

Copy link
Copy Markdown
Collaborator Author

After having gemini flash 3.7 look through all the recipes, there seems to be only one recipe that saves tensors (ESC50/interpret/interpreter_brain.py). I have fixed this one and run the ESC50 recipe tests (and a few others) so we should be good to go.

Adel-Moumen merged commit 22a6166 into speechbrain:develop Aug 24, 2026
5 checks passed
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL