Skip to content
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

Don't fail when pickling models which haven't been trained further #1034

Merged
merged 3 commits into from
Nov 28, 2023

Conversation

marco-c
Copy link
Contributor

@marco-c marco-c commented Nov 24, 2023

pbar_ is only set in on_epoch_begin, so if on_epoch_begin is never called there will be a failure in saving the model.

@BenjaminBossan
Copy link
Collaborator

Thanks for the bugfix, good catch. Ideally, we would have a test to ensure that there is no regression on this bug. Do you want to give it a shot? Otherwise, we can merge this as is and will add the test later.

@marco-c
Copy link
Contributor Author

marco-c commented Nov 27, 2023

@BenjaminBossan I added a test.

@BenjaminBossan
Copy link
Collaborator

Great, Marco. If you could add a reference to this PR (#1034) to the comment of the test, that would be perfect.

@marco-c
Copy link
Contributor Author

marco-c commented Nov 28, 2023

Done!

Copy link
Collaborator

@BenjaminBossan BenjaminBossan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for fixing the bug and adding the test. LGTM

@BenjaminBossan BenjaminBossan merged commit 7f55393 into skorch-dev:master Nov 28, 2023
14 checks passed
@marco-c marco-c deleted the pbar_ branch November 28, 2023 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants