ray
ray copied to clipboard
[Core] Incompatibility with the Rtree library.
What happened + What you expected to happen
It dosen't work with rtree index structure from python Rtree library. When I create the index in one remote func and pass it as input to another func I won't get the same index. I expect that the index object to be stable (not changed) between remote funcs.
Versions / Dependencies
Rtree==1.2.0 ray==2.20.0
Python 3.10
Reproduction script
import ray
from rtree import index as rindex
def make_rtree_index():
ridx = rindex.Index()
ridx.insert(0, [0, 10, 20, 30])
return ridx
def show_rtree(rtree):
print(rtree.bounds)
if __name__ == "__main__":
# Run wo/ ray
rtree = make_rtree_index()
show_rtree(rtree)
# Run w/ ray
ray.init(local_mode=True)
make_rtree_index = ray.remote(make_rtree_index)
show_rtree = ray.remote(show_rtree)
rtree = make_rtree_index.remote()
show_rtree.remote(rtree)
Issue Severity
Medium: It is a significant difficulty but I can work around it.
I can't reproduce this problem in the current mainline, maybe you can try the latest source code installation, or version 2.22.0
Can you retry with ray 2.22.0 and print the result differences? Thanks