Help Center/
ModelArts/
Troubleshooting/
Training Jobs/
In-Cloud Migration Adaptation Issues/
Error Message "AttributeError: module '***' has no attribute '***'" Is Displayed Training Job Logs
Updated on 2025-09-10 GMT+08:00
Error Message "AttributeError: module '***' has no attribute '***'" Is 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 Creating a Custom Image for Model Training.
Summary and Suggestions
Before creating a training job, use the ModelArts development environment to debug your training code and minimize migration errors.
- Use the notebook environment for online debugging. For details, see Using JupyterLab to Develop and Debug Code Online.
- Use a local IDE (PyCharm or VS Code) to access the cloud environment for debugging. For details, see Connecting to a Notebook Instance Through VS Code.
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