gramineproject / examples

Sample applications configs for Gramine
BSD 3-Clause "New" or "Revised" License
29 stars 22 forks source link

Fix deprecation warning in PyTorch example #52

Closed jkr0103 closed 1 year ago

jkr0103 commented 1 year ago

PyTorch example report below warning with command python3 download-pretrained-model.py in prerequisites:

/home/xxx/.local/lib/python3.8/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
  warnings.warn(
/home/xxx/.local/lib/python3.8/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=AlexNet_Weights.IMAGENET1K_V1`. You can also use `weights=AlexNet_Weights.DEFAULT` to get the most up-to-date weights.
  warnings.warn(msg)
Pre-trained model was saved in "alexnet-pretrained.pt"

This example is used on Curated-Apps, hence we see this warning there as well.

PR fixes this warning.


This change is Reviewable