Repository navigation
MNT carry out deprecation for default change of "copy" in HDBSCAN - #35262
Conversation
AnneBeyer
left a comment
There was a problem hiding this comment.
Thanks @FrancoisPgm!
Two small things Claude flagged:
- This filter can also be removed now:
- It also noted that there is not test path for the default value. I think it would make sense to remove
copy=Truehere as well:
…n_distance_matrix
Thanks, I (and Cursor too :O) somehow missed it.
I initially left all the |
lesteve
left a comment
There was a problem hiding this comment.
LGTM, thanks!
@AnneBeyer feel free to double-check whether you are happy with the changes. If you are happy, ping me and I can merge this one!
| @@ -590,16 +590,3 @@ def test_hdbscan_cosine_metric_invalid_algorithm(invalid_algo): | |||
| hdbscan = HDBSCAN(metric="cosine", algorithm=invalid_algo, copy=False) | |||
There was a problem hiding this comment.
If I'm being pedantic, we could also remove the parameter here and in the other 33 cases (Claude's count), as the parameter was only added to silence the warning from the deprecation and is never actually relevant to the test.
| hdbscan = HDBSCAN(metric="cosine", algorithm=invalid_algo, copy=False) | |
| hdbscan = HDBSCAN(metric="cosine", algorithm=invalid_algo) |
There was a problem hiding this comment.
I don't detect any pedantry here, it's true that all the copy=False were added in #31973 to silence the warning, so no point in keeping them here, I'll remove them.
There was a problem hiding this comment.
While removing all the copy=False, I realized no test was testing copy, so I added one. WDYT @AnneBeyer ?
AnneBeyer
left a comment
There was a problem hiding this comment.
See my last comment for one small potential improvement, but I'm fine with merging it as is as well.
|
Let's merge this to get one item less in the 1.10 milestone. Remaining follow-up tweaks can be done later, since they are only about testing, unless I missed something. |
|
Thanks @FrancoisPgm and @AnneBeyer! |
Reference Issues/PRs
Towards #35252
What does this implement/fix? Explain your changes.
Change the default of
copyfrom False to True inHDBSCAN.Introduce yourself
AI usage disclosure
I used AI assistance for:
Any other comments?