Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecated issue for IgniteInfo #1849

Merged
merged 6 commits into from
Sep 30, 2024
Merged

Conversation

KumoLiu
Copy link
Contributor

@KumoLiu KumoLiu commented Sep 29, 2024

Set weights_only=True because this warning.

You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See [pytorch/SECURITY.md at main · pytorch/pytorch · GitHub 2](https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models) for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don’t have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.

Checks

  • Avoid including large-size files in the PR.
  • Clean up long text outputs from code cells in the notebook.
  • For security purposes, please check the contents and remove any sensitive info such as user names and private key.
  • Ensure (1) hyperlinks and markdown anchors are working (2) use relative paths for tutorial repo files (3) put figure and graphs in the ./figure folder
  • Notebook runs automatically ./runner.sh -t <path to .ipynb file>

Signed-off-by: YunLiu <[email protected]>
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@KumoLiu KumoLiu requested review from ericspod and Nic-Ma September 29, 2024 06:21
Signed-off-by: YunLiu <[email protected]>
This reverts commit 4ad98c2021650e5b87e6048f438e0aaca1cf0622.
…hub.com>

I, YunLiu <[email protected]>, hereby add my Signed-off-by to this commit: 16ec768

Signed-off-by: YunLiu <[email protected]>
Signed-off-by: YunLiu <[email protected]>
Signed-off-by: YunLiu <[email protected]>
@mingxin-zheng
Copy link
Contributor

mingxin-zheng commented Sep 30, 2024

Hi @KumoLiu , can you make a note why we would like to set weights_only to True either in the PR message or in the notebook?
The rest looks good to me.

@KumoLiu
Copy link
Contributor Author

KumoLiu commented Sep 30, 2024

Hi @KumoLiu , can you make a note why we would like to set weights_only to True either in the PR message or in the notebook? The rest looks good to me.

Sure, added it in the description.

@KumoLiu KumoLiu enabled auto-merge (squash) September 30, 2024 05:38
@KumoLiu KumoLiu merged commit e4cf547 into Project-MONAI:main Sep 30, 2024
6 checks passed
@KumoLiu KumoLiu deleted the fix-ignite branch September 30, 2024 06:37
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