-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG] ENH avoid deepcopy when a parameter is declared immutable #16185
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
@ogrisel proposed to use |
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.
This needs documentation, at least, ideally including a good example of when you'd use the tag.
I added some documentation. @jnothman Do you think that I should an extra example with an hand-crafted estimator? If yes, I don't exactly know which section I should add such example. |
It will not solve these problems. It will only not copy the
Still not since it works at the level of the For this particular case, would it make sense to make a |
@glemaitre I think I understand the freezing part: it's not enough to not clone because we'll call fit later, and it's a bit unclear how to change tags during runtime. I don't understand the It basically achieves what polymorphic clone does: #5080. This is not enough for freezing but I think this had been one of the sticking points. For freezing we'd also have to do something to |
Oh, yes it will fix this case since |
What is missing for this to be merged? |
We can probably close this one in favor of scikit-learn/enhancement_proposals#67 |
closing for the same reason as #5563 (comment) |
closes #5563
closes #9696
closes #16137
Using estimator tags to avoid a deep copy of parameters when cloning.