Help Center/
ModelArts/
Troubleshooting/
Training Jobs/
In-Cloud Migration Adaptation Issues/
Error Message "AttributeError: module '***' has no attribute '***'" Displayed Training Job Logs
Updated on 2024-04-30 GMT+08:00
Error Message "AttributeError: module '***' has no attribute '***'" Displayed Training Job Logs
Symptom
Error message "AttributeError: module '***' has no attribute '***'" is displayed in the logs of a training job, for example, "AttributeError: module 'torch' has no attribute 'concat'".
Possible Causes
The possible causes are as follows:
- The Python package is incorrectly used. There is no required variable or method in the Python package.
- The Python package version in the third-party pip source has been updated. As a result, the version of the Python package installed in the training job may also change. If a training job ran properly originally, but this issue occurs in the training job later, consider this cause.
Solution
- Use notebook for debugging.
- Specify a version for installation, for example, pip install xxx==1.x.x.
- The third-party pip source may be updated at any time. To prevent this issue from occurring, create a custom image. For details, see Using a Custom Image to Train Models (Model Training).
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: In-Cloud Migration Adaptation 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