Help Center/
ModelArts/
Troubleshooting/
Training Jobs/
Internet Access Issues/
Error Message "Network is unreachable" Displayed in Logs
Updated on 2022-12-08 GMT+08:00
Error Message "Network is unreachable" Displayed in Logs
Symptom
When PyTorch is used, the following error message will be displayed in logs after pretrained in torchvision.models is set to True:
'OSError: [Errno 101] Network is unreachable'
Possible Causes
For security purposes, ModelArts internal training nodes are not allowed to access the Internet.
Solution
- Change the pretrained value to False, download the pre-trained model, and load the path to this model.
import torch import torchvision.models as models model1 = models.resnet34(pretrained=False, progress=True) checkpoint = '/xxx/resnet34-333f7ec4.pth' state_dict = torch.load(checkpoint) model1.load_state_dict(state_dict)
- Use the local PyCharm to remotely access notebook for debugging.
Summary and Suggestions
Before creating a training job, use the ModelArts development environment to debug the training code to maximally eliminate errors in code migration.
- Use the online notebook environment for debugging. For details, see Using JupyterLab to Develop a Model.
- Use the local IDE (PyCharm or VS Code) to access the cloud environment for debugging. For details, see Using the Local IDE to Develop a Model.
Parent topic: Internet Access Issues
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot