-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG] FIX Avoid default mutable argument in constructor of AgglomerativeClustering #8153
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
Problem with putting in new validation is that now it needs a unit test :P |
Are you sure that it needs a unit test? It's the default argument, hence it is covered in the existing tests. |
I mean now there is an error raised if memory is not a |
I mean now there is an error raised if memory is not a str or a Memory,
but that line no longer has code coverage. So ideally there would be a
test that the right error is raised at the right time if memory=5.
Good point. Agreed.
|
Thanks @glemaitre |
Reference Issue
What does this implement/fix? Explain your changes.
As pointed out in #7990,
joblib.Memory
is mutable. It was usedas a default argument of the constructor of
AgglomerativeClustering
.This fix just pass
None
and initialize atfit
time thememory
withthe same behaviour as previously implemented.
Any other comments?