lmcinnes / pynndescent

A Python nearest neighbor descent for approximate nearest neighbors
BSD 2-Clause "Simplified" License
899 stars 105 forks source link

AttributeError: 'NNDescent' object has no attribute '_visited' #131

Closed kevinlu1248 closed 3 years ago

kevinlu1248 commented 3 years ago

Hello, I attended the pynndescent tutorial at this year's scipy conference so I decided to try it out, but I got a AttributeError when running it on Colab at https://colab.research.google.com/drive/1RURA2pL90ejk3H-W6BeR7WGfc3EgCLiE?usp=sharing while following the tutorial at https://pynndescent.readthedocs.io/en/latest/how_to_use_pynndescent.html. Thanks!

lmcinnes commented 3 years ago

This is rather odd because I have never seen anything like this before, and this is definitlely the sort of thing the test suite would flag if it usually occurred, so there must be something odd going on somewhere. Unfortunately that makes it potentially hard to track down. I'll see what I can figure out.

lmcinnes commented 3 years ago

After a quick first look it seems that this is actually possibly associated to numba caching and colab not playing well together. This starts to get out of my field of knowledge fairly quickly. Any chance you can run this not on colab? Does it then work?

kevinlu1248 commented 3 years ago

Okay with assistance from @lmcinnes over slack, running _init_search_graph() multiple times did eventually fix my problems so I will close this issue now. If there's a better solution please let me know.