Skip to content
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

efficient parallel list-list solver #8

Open
bertsky opened this issue Oct 25, 2022 · 3 comments
Open

efficient parallel list-list solver #8

bertsky opened this issue Oct 25, 2022 · 3 comments

Comments

@bertsky
Copy link
Contributor

bertsky commented Oct 25, 2022

In rapidfuzz there's a cdist function that computes a matrix of alignment scores between each pair of two collections in parallel.

Is there something similar in pyalign, too?

@poke1024
Copy link
Owner

poke1024 commented Oct 27, 2022

There's a so-called batch mode, though I need to remind myself how it works. It makes use of SIMD calls to speed up computing multiple alignments at the same time. This is the code at the end of the example notebook - it does not seem to work right now. I need to check.

@bertsky
Copy link
Contributor Author

bertsky commented Oct 28, 2022

Ok, so in order to utilise multiple cores, I therefore have to wrap the solver (batched or not) in some Pythonic multiprocessing paradigm, right? Since builtin multithreading suffers from GIL and multiprocessing restricts sharing data to pickle-able objects, is there any one you can recommend in particular? (Like builtin concurrent.futures, or Joblib, Ray, MPIRE?)

@poke1024
Copy link
Owner

Yes, exactly. In theory, multithreading should already give good concurrency, since pyalign will release the GIL once it is inside the C++ code and does the heavy computations - I have never tested this out though. I have no suggestion to multiprocessing libs, I only have used the builtin multiprocessing so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants