Failed to Import a Module

Symptom

The following error occurs in the log when a module is imported to a ModelArts training job:

Traceback (most recent call last):File "project_dir/main.py", line 1, in <module>from module_dir import module_file
ImportError: No module named module_dir
ImportError: No module named xxx

Possible Cause

Solution