[CDSW] Package import error during model deployment
There is an error during cdsw model deployment where the package of code is not imported.
- CDSW version
1.9.2
- Folder Configuration
/home/cdsw
l- ex_package_one
l l- ex_package_two
l l-ex_pkg_code.py
l
l- predict
l l- predict.py
predict.py is the code used in the model deployment.
- Package import code within predict.py
....
from ex_package_one.ex_package_two import ex_pkg_code
...
- Error log
ModuleNotFoundError: No module named 'ex_package_one'
- Attempt to resolve the error
I printed it out as os.getcwd() from predict.py and it came out as /cdsw/home.
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname("__file__"))))
The path was added using the above code, but the same error occurred.
No package errors will occur if the code is transferred to /home/cdsw/predict.py.
Is there any other way to solve this problem?
Thank you for any help.

