-
-
Notifications
You must be signed in to change notification settings - Fork 26.5k
MAINT refactor heap routines into utils #21987
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
Conversation
thomasjpfan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening this PR @jjerphan !
I think this PR can be merged directly into main. It has no functional changes and is a refactor that makes the original code easier to maintain.
(It also has a side benefit of using fused types in simultaneous_sort.)
Co-authored-by: Thomas J. Fan <[email protected]>
PairwiseDistancesReduction introductionPairwiseDistancesReduction introduction
PairwiseDistancesReduction introductionPairwiseDistancesReduction introduction
|
Thank you, @thomasjpfan. I really appreciate your quick response and commitment. 🤝 I've changed the base to |
lorentzenchr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Christian Lorentzen <[email protected]>
|
@lorentzenchr: Let me know if e369008 makes the comments clearer. |
ogrisel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as well!
ogrisel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestions to further improve the docstring:
Also fix typo. Co-authored-by: Olivier Grisel <[email protected]>
Co-authored-by: Jérémie du Boisberranger <[email protected]>
Co-authored-by: Thomas J. Fan <[email protected]>
Co-authored-by: Jérémie du Boisberranger <[email protected]>
lorentzenchr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Christian Lorentzen <[email protected]>
|
Waiting for a green CI...⏳ |
|
BTW, this is a nice example of a refactoring with no new code but +100 diff which mainly comes from better docstrings and comments. |
|
I don't understand why code coverage is not passing now. 🤔 |
As to see if there's a glitch on the CI codecov/patch.
Co-authored-by: Christian Lorentzen <[email protected]>
|
This is a general observation based on several identical experience: we spend much time rerunning a full CI several time for tiny diffs. I think that this situation is not that efficient on several aspects: it breaks the programming experience forcing us to wait for a feedback which takes close to a half an hour eventually creating context switches for every one; it also uses much more energy than needed, rerunning all the test suite. Hence some naive questions: Do you think it is worth improving this? Is there a solution which allows solely rerunning relevant CI jobs in a finer-grained fashion? Edit: all 🟢, @lorentzenchr. |
PairwiseDistancesReduction introduction
Reference Issues/PRs
Part of breaking #21462 down in smaller PRs.
What does this implement/fix? Explain your changes.
A few fixtures have been refactored and/or introduced in #21462.
This PR encapsulates those changes.
This PR refactors the Cython heap routines currently in the
neighborsmodule intosklearn.utils. It improves by making use of fused types. It also adds the Cython routine_openmp_thread_numto the openmp helpers.