Skip to content

Conversation

@iden-kalemaj
Copy link
Contributor

Differential Revision: D68973109

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 31, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68973109

iden-kalemaj added a commit to iden-kalemaj/opacus that referenced this pull request Jan 31, 2025
Summary: Pull Request resolved: meta-pytorch#726

Differential Revision: D68973109
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68973109

iden-kalemaj added a commit to iden-kalemaj/opacus that referenced this pull request Jan 31, 2025
Summary:



(1) CIFAR10 cuda tests were failing with the following message:

> _pickle.UnpicklingError: Weights only load failed. This file can still be loaded, to do so you have two options, do those steps only if you trust the source of the checkpoint. 
	(1) In PyTorch 2.6, we changed the default value of the `weights_only` argument in `torch.load` from `False` to `True`. Re-running `torch.load` with `weights_only` set to `False` will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.

Specified weights_only=False in torch.load() and tests are passing.


(2) A similar issue was appearing with multiple unit tests due to the change in behavior of `wieghts_only`: Changed the behavior in `per_sample_gradient_utils.py`.



(3) Black was requestsing addition of commas when listing mutliple variable types. (Locally there were no issues, appeared only GithubActions).

Differential Revision: D68973109
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68973109

Summary:



(1) CIFAR10 cuda tests were failing with the following message. [Example](https://github.com/pytorch/opacus/actions/runs/13079011269/job/36498002040#step:7:757). 

> _pickle.UnpicklingError: Weights only load failed [...] In PyTorch 2.6, we changed the default value of the `weights_only` argument in `torch.load` from `False` to `True`. Re-running `torch.load` with `weights_only` set to `False` will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.

Specified weights_only=False in torch.load() and tests are passing.


(2) A similar issue was appearing with multiple unit tests due to the change in behavior of `wieghts_only`. [Example](https://github.com/pytorch/opacus/actions/runs/13080274224/job/36502044189). Changed the behavior in `per_sample_gradient_utils.py`. 



(3) Black was requesting addition of commas when listing mutliple variable types. (Locally there were no issues, appeared only GithubActions). [Example](https://github.com/pytorch/opacus/actions/runs/13080274224/job/36502043210).

Differential Revision: D68973109
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68973109

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in c7225a2.

afuaansah pushed a commit to afuaansah/opacus that referenced this pull request Mar 4, 2025
Summary:
Pull Request resolved: meta-pytorch#726

(1) CIFAR10 cuda tests were failing with the following message. [Example](https://github.com/pytorch/opacus/actions/runs/13079011269/job/36498002040#step:7:757).

> _pickle.UnpicklingError: Weights only load failed [...] In PyTorch 2.6, we changed the default value of the `weights_only` argument in `torch.load` from `False` to `True`. Re-running `torch.load` with `weights_only` set to `False` will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.

Specified weights_only=False in torch.load() and tests are passing.

(2) A similar issue was happening with multiple unit tests due to the change in behavior of `weights_only`. [Example](https://github.com/pytorch/opacus/actions/runs/13080274224/job/36502044189). Changed the `weights_only` setting where necessary.

(3) Black was requesting addition of commas when listing mutliple variable types. (Locally there were no issues, appeared only GithubActions). [Example](https://github.com/pytorch/opacus/actions/runs/13080274224/job/36502043210).

Reviewed By: EnayatUllah

Differential Revision: D68973109

fbshipit-source-id: 7fbe9702dcfc72b40fe95bb8a749d2163525231b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants