Hello,
I’m experiencing an exception when I specifiy a worker_process_setup_hook in the runtime environment of ray.init. When I simply execute the demo code from the ray documentation, tasks fail apprently due to spaces in the path.
import ray
import logging
import warnings
def logging_setup_func():
logger = logging.getLogger("ray")
logger.setLevel(logging.DEBUG)
warnings.simplefilter("always")
ray.init(runtime_env={"worker_process_setup_hook": logging_setup_func})
logging_setup_func()
@ray.remote
def f(x):
return x * x
futures = [f.remote(i) for i in range(4)]
print(ray.get(futures)) # [0, 1, 4, 9]
Assuming python is located in “C:\folder with spaces\python.exe”, this generates the exception:
(raylet) C:\folder with spaces\python.exe: can't open file 'C:\\folder\\with\\spaces\\Lib\\site-packages\\ray\\_private\\workers\\default_worker.py': [Errno 2] No such file or directory
So apparently the spaces in directory “folder with spaces” are considered as subfolders.
I’m running ray 2.7.1 with Python 3.11.4 on Windows 10.
Any ideas?
Thanks!