Skip to content

Security: Fix unsafe torch.load in FSDP2 scaler path (#3964)#3966

Open
davidequarracino wants to merge 3 commits intohuggingface:mainfrom
davidequarracino:security-fix-3964
Open

Security: Fix unsafe torch.load in FSDP2 scaler path (#3964)#3966
davidequarracino wants to merge 3 commits intohuggingface:mainfrom
davidequarracino:security-fix-3964

Conversation

@davidequarracino
Copy link

Security fix for #3964 (CWE-502). Added weights_only=True to torch.load in FSDP2 scaler path (line 3811) to prevent arbitrary code execution. This PR was split to prioritize safety.

This tutorial implements Method 2 by demonstrating how to gather predictions into an external list using gather_object and .extend() within notebook_launcher.
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.

1 participant