unum-cloud / usearch

Fast Open-Source Search & Clustering engine × for Vectors & 🔜 Strings × in C++, C, Python, JavaScript, Rust, Java, Objective-C, Swift, C#, GoLang, and Wolfram 🔍
https://unum-cloud.github.io/usearch/
Apache License 2.0
2.15k stars 130 forks source link

Feature: Progress tracking and conditional termination from Python #206

Closed ashvardanian closed 1 year ago

ashvardanian commented 1 year ago

Describe what you are looking for

Most long-running tasks in the C++ layer have an optional progress callback argument that can report the progress and potentially terminate the job somewhere in the middle. Python and other language bindings don't currently use that feature, externally slicing the np.ndarray of tasks and updating tqdm indicator after every batch.

That, however, does not apply to cluster, join, save, and load. So we need to pass some functions from Python to C++ bindings, that will be invoked only from one thread to avoid GIL issues.

Can you contribute to the implementation?

Is your feature request specific to a certain interface?

Python bindings

Contact Details

No response

Is there an existing issue for this?

Code of Conduct