-
Notifications
You must be signed in to change notification settings - Fork 10
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
fix(EstimatorReport): Make a deep copy of fitted estimator in constructor to avoid side-effect #1085
Conversation
18002cf
to
055e9af
Compare
So putting here some comments that we had in a IRL discussion with @augustebaum. I did not evaluate the problem properly: for The decision here is to trigger a |
055e9af
to
5b9b55a
Compare
Coverage Report for backend
|
Here, are a couple of comments but it looks good. |
Co-authored-by: Guillaume Lemaitre <[email protected]>
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. Thanks a lot @augustebaum
Closes #1081
When initializing the
EstimatorReport
, we nowdeepcopy
the input estimator unless it iscloned
.This way, if the user re-fits their estimator after giving it as input to
EstimatorReport
, this will have no impact on the report itself.If
deepcopy
doesn't succeed, we keep the previous behaviour and issue a warning about the potential side-effects.