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

Training without storing model states #705

Open
Ditwoo opened this issue Mar 14, 2020 · 1 comment
Open

Training without storing model states #705

Ditwoo opened this issue Mar 14, 2020 · 1 comment

Comments

@Ditwoo
Copy link
Contributor

@Ditwoo Ditwoo commented Mar 14, 2020

Description
In some rare cases, for example, when you need to finetune a large model on a small dataset the majoring part of training loop is waiting for saving model checkpoints to a hard drive.

Proposal
Would be logically to add a CheckpointCallback with parameter save_n_best=0 to a configuration and do not store best checkpoints and instead use the latest state of the model.

Note
All of the described above is a proposal mostly for config API because config API during the stages loads the best checkpoint from the previous stage.

So here are a few steps to how it can be achieved:

  1. For using the latest state of the model you need to overload a get_model property of ConfigExperiment to return the latest model (something like in BaseExperiment).
  2. To prevent saving the model state to a hard drive overload property get_callbacks of experiment class and remove CheckpointCallback from default callbacks.
  3. Create and use an empty callback instead of CheckpointCallback.
@Scitator
Copy link
Member

@Scitator Scitator commented Apr 22, 2020

Dear @Ditwoo,
could you please make a Pull Request with such functionality?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.