Possible bug in ray 2.3.1: Setting max_calls=1 for a method and local_mode=True leads to a ValueError

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

local_mode=False
or
max_calls=0
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()

@eran_yogev local_mode is not well supported in the recent ray release. You can file a ticket to github for this one.

Besides that, may I ask when you are interested in local mode?

I read local_mode is going to be deprecated so I’m not sure there’s a point to file a ticket, but thanks.

I use local_mode for debugging.

@eran_yogev Right, the local_mode is going to be deprecated in favor of using Ray debugger

Since there’s no point in filing an issue, should we close this as resolved?