-
Notifications
You must be signed in to change notification settings - Fork 394
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
incompatibility of skorch.callbacks.TrainEndCheckpoint with sklearn.compose.TransformedTargetRegressor #459
Comments
Thanks for reporting the bug. I believe the solution would not be optimal, it is better to be explicit about parameters in this case. There are 3 parameters missing from The solution would be either to add these parameters with the new defaults -- but it would not really make sense to have them on I don't have a strong preference, what do others think? @gillesdami If you would like to work on one of the solutions, or a better one, go ahead. |
I think adding a |
Adding explicitly |
The reason why I would avoid Another solution would be to add the three missing parameters but make a check that their values are what is needed (this check would ideally also work after a |
skorch version: 0.5.0.post0
Minimal example inspired from the docs:
error returned:
explanation:
For some reason, sklearn will make a copy of the callbacks when using TransformedTargetRegressor. However they does not respect the BaseEstimator specs.
fix:
The callbacks classes inherited from Callback should have **args in their __init__ function to ensure that they accept all Callback.__init__ parameters.
May I open a PR ?
The text was updated successfully, but these errors were encountered: