Possible bug in ray 2.3.1:
The following code which uses max_calls=1 for method f and local_mode=True
leads to the following error:
ValueError: An application is trying to access Ray objects whose owner is unknown
does not lead to the same error.
import ray def f(): return 1 def test_train_inside_ray_local(): try: ray.init(local_mode=True) f_ray = ray.remote(max_calls=1)(f) ref_id_a = f_ray.remote() res = ray.get(ref_id_a) print(res) finally: ray.shutdown() if __name__ == '__main__': test_train_inside_ray_local()