Calling actor.remote() from a pythonic thread

Is it generally supported making ray calls (actor.method.remote(), ray.wait(), ray.get(), etc…) from a (non main) pythonic thread? (ray 1.8.0)

Practically, on heavy workloads we’re always encountering the known issue of forever blocking remote() call (after a few hours of successful operation). Similar issue has been previously reported here Ray actor.remote() call blocks forever. However, we’re suspecting that the fact we’re making these calls from a non-main thread is the cause for this issue in our case. Conducting the same calls from the main thread of an actor doesn’t seem to fail in the same fashion.

The question: Is conducting ray calls from a non-main thread generally not recommended (especially for ray 1.8.0)?

Thanks

Hey @eladgm - calling ray methods from another thread is expected to work.

If you run into some issues, would appreciate if you have a minimal repro script so we could take a look.

Also, issues you linked seems to be fixed in a recent ray releases last year.

I would highly recommend upgrading to a newer version of ray (i.e. 2.0) if it’s possible.

1 Like