Hi, I try to instantiate a Python class from another python file and then use ray.put() to store the instance into the object store. The code is like this:
import ray
import myclass
ray.init()
instance = myclass.model()
ray.put(instance)
then such a mistake has occurred:
**
File “C:\Users\win10\AppData\Local\conda\conda\envs\drl\lib\site-packages\ray\util\client\worker.py”, line 407, in _put_pickled
raise cloudpickle.loads(resp.error)
ModuleNotFoundError: No module named ‘myclass’
Process finished with exit code 1
**
I guess this is because the file myclass.py is not in the same directory with worker.py.
How could I solve it?