简体   繁体   中英

SageMaker Neo PyTorch 1.0.0

I've updated the torch version in my SageMaker pytorch_36 kernel to torch version 1.0.0. I then tried running the example notebook pytorch_torchvision_neo.ipynb , also changing the framework_version to 1.0.0. Neo compilation then fails.

Any idea why it isn't working with 1.0.0? The console error message actually tells me to make sure I'm using 1.0.0, but the example notebook seems to only work with 0.4.0.

Sagemaker notebook has pytorch-1.1.0 pre-installed. But Model Compilation service expects model saved by pytorch-0.4.0 or pytorch-1.0.1

Solution to the issue:

# 1. do not install `pytorch-cpu` and `torchvision-cpu`.

# 2. Downgrade pytorch version to 1.0.1
!conda install -y pytorch=1.0.1 -c pytorch 

# 3. import pytorch and check that version is 1.0.1 (but not 1.1.0)
import torch 
torch.__version__

Continue to run notebook steps: https://github.com/awslabs/amazon-sagemaker-examples/blob/master/sagemaker_neo_compilation_jobs/pytorch_torchvision/pytorch_torchvision_neo.ipynb

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM