-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pickling and unpickling messes up Index #87
Comments
Would really love to see this fix/implemented. I also notice that specifying an index name doesn't lead to the index to be stored at a particular file path? It would be useful to be able to find the serialised data somehow. I've also tried pickling with dill and it gives the same issue. Wish I could help but I couldn't understand the serialisation code at all. |
I am having exactly the same problem here on Ubuntu 18.04 with Python 3.6. |
Is this issue is planned to be solved? It could be super useful to keep the hand on the "right time" and the conditions under which the index has to serialized. |
We just ran into this as well. TorchGeo uses rtree to store a database of raster file bounding boxes. However, if you try to use a parallel data loader, the multiprocessing library will pickle and unpickle the index, and all entries in the index will be removed. I tried digging into this but couldn't get any further than anyone else. I guess it would be useful to understand why we need to delete the state handle instead of just pickling it. It seems that if I remove the |
Update: I found a hack to make this work: #197. I don't like it, but it's better than nothing. |
Pickling and unpickling renders the Index unusable. The test_pickle.py does not test the correct properties, should check Index.bounds as well. Code to reproduce:
The text was updated successfully, but these errors were encountered: