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

simplify get_matching_cpu implementation #385

Merged
merged 1 commit into from
Jan 18, 2024
Merged

simplify get_matching_cpu implementation #385

merged 1 commit into from
Jan 18, 2024

Conversation

maxbachmann
Copy link
Contributor

This PR simplifies the implementation of get_matching_cpu. In addition it replaces fuzzywuzzy with rapidfuzz, since fuzzywuzzy is not maintained anymore and is GPL licensed.

In theory this new implementation is faster, but since CPU lists should be pretty short this does not really matter here.

Copy link
Contributor

@benoit-cty benoit-cty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking at this !

@benoit-cty
Copy link
Contributor

There is an error in CI:

  ./src/rapidfuzz/cpp_common.pxd:396: TypeError : ('Got unexpected keyword arguments: ', 'process')

Do you have an idea ?

@maxbachmann
Copy link
Contributor Author

Ah yes it should have used processor instead of process.

@benoit-cty
Copy link
Contributor

Hello,
Sorry for the delay but some tests fail with rapidfuzzy : pytest -v tests/test_cpu.py::TestTDP::test_get_matching_cpu
And if I lower the threshold it make another test to fail.

@maxbachmann
Copy link
Contributor Author

With rapidfuzz v3.0.0 strings are no longer preprocessed by default. Enabling it again should fix this.

@maxbachmann
Copy link
Contributor Author

@benoit-cty are you still interested in this? I could rebase it in this case. Otherwise I will close this PR.

@benoit-cty
Copy link
Contributor

Hello, yes we are still interested. If all test pass I'm ok to merge it.
Thanks for the reminder 👍

@maxbachmann
Copy link
Contributor Author

@benoit-cty I rebased the change + fixed the new linter rules

@benoit-cty
Copy link
Contributor

Thanks a lot !

@benoit-cty benoit-cty merged commit 4a515fd into mlco2:master Jan 18, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants