benfred / implicit

Fast Python Collaborative Filtering for Implicit Feedback Datasets
https://benfred.github.io/implicit/
MIT License
3.57k stars 612 forks source link

Release GIL on GPU calls #528

Closed benfred closed 2 years ago

benfred commented 2 years ago

Previous code was holding on the GIL when training models on the GPU or when calculating results. This caused some jank on progress bars displaying in jupyter notebooks, as well as just being poor form. Fix by releasing the GIL before starting on gpu code that will take an appreciable amount of time.