import ray
@ray.remote
def f():
return 1
ray.init(num_cpus=1)
print(ray.get(f.remote()))
ray.shutdown()
ray.init(num_cpus=1)
print(ray.get(f.remote()))
ray.shutdown()
The above script will hang at the second ray.get(f.remote()) with error message This worker was asked to execute a function that it does not have registered. You may have to restart Ray. This is because the function is only registered to the first GCS.
I discovered this issue when I was trying to consolidating python tests in travis, see
|
# TODO(williamma12): We cannot use pytests built-in test discovery because |
|
# it causes a lot of the tests to fail on travis' apple builds even though |
|
# it runs without issue on an apple build locally. |
cc
@williamma12
Similar but not the same with #3897
The above script will hang at the second
ray.get(f.remote())with error messageThis worker was asked to execute a function that it does not have registered. You may have to restart Ray.This is because the function is only registered to the first GCS.I discovered this issue when I was trying to consolidating python tests in travis, see
ray/.travis.yml
Lines 182 to 184 in 387c98c
Similar but not the same with #3897