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

[FEATURE] Model checkpoint save/load #137

Open
rodrigo-arenas opened this issue Aug 9, 2023 · 5 comments
Open

[FEATURE] Model checkpoint save/load #137

rodrigo-arenas opened this issue Aug 9, 2023 · 5 comments
Assignees
Labels
help wanted Extra attention is needed new feature Describe the request of new features up-for-grabs

Comments

@rodrigo-arenas
Copy link
Owner

It would be nice to enable saving and loading models checkpoints, this could help to control training the model in different sessions in case is a large model, as well as keeping a copy of the model in case of some error during the training time

I open this issue for contributors

This Issue requests the following features:

Describe the solution you'd expect

  • Enable saving model checkpoints as a callback named ModelCheckpoint that takes as an argument the location to save the model
  • The checkpoints should save the training status and the logbook object, you can make use of the already implemented class LogbookSaver
  • Implement save and load methods in GASearchCV and GAFeatureSelectionCV
  • When calling the fit method, it should resume the training where it was left by default
  • Enable an option to start the training again (from generation 0) but with starting point (i.e hyperparameters or features) the best ones found so far in the saved model

Additional context
You can check TensorFlow save and load weights methods as an inspiration

@rodrigo-arenas rodrigo-arenas added help wanted Extra attention is needed new feature Describe the request of new features up-for-grabs labels Aug 9, 2023
@cpparnell
Copy link

I would like to work on this, is that alright?

@rodrigo-arenas
Copy link
Owner Author

Hi @cpparnell sure, you can work on it, thanks

@cpparnell
Copy link

cpparnell commented Oct 25, 2023

@rodrigo-arenas I have some questions about the last two bullet points:

  • When calling the fit method, it should resume the training where it was left by default
  • Enable an option to start the training again (from generation 0) but with starting point (i.e hyperparameters or features) the best ones found so far in the saved model

Should there be an option provided to the fit method to start training again? Or should the functionality described above be implemented within the ModelCheckpoint callback?

Do you mean that I should be able to use the load method to load from the checkpoint path, similar to what is described in TensorFlow's ModelCheckpoint?

@rodrigo-arenas
Copy link
Owner Author

Hi, there is already a version working with some of the specifications made by @The-Blitz at #158, however, we still need to work in the feature:

  • When calling the fit method, it should resume the training where it was left by default
  • Enable an option to start the training again (from generation 0) but with a starting point (i.e hyperparameters or features) the best ones found so far in the saved model

The second one should be possible by using the recently added parameter warm_start_configs

@The-Blitz
Copy link
Contributor

@rodrigo-arenas I just noticed the PR was pushed haha. I thought there were pending errors on some tests which I could not see locally. Anyway I will try to check the missing points when possible, if you don't mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed new feature Describe the request of new features up-for-grabs
Projects
None yet
Development

No branches or pull requests

3 participants