Chris-hughes10 / pytorch-accelerated

A lightweight library designed to accelerate the process of training PyTorch models by providing a minimal, but extensible training loop which is flexible enough to handle the majority of use cases, and capable of utilizing different hardware options with no code changes required. Docs: https://pytorch-accelerated.readthedocs.io/en/latest/
Apache License 2.0
176 stars 21 forks source link

Possible to specify a directory for serializing the best checkpoint? #20

Closed sayakpaul closed 2 years ago

sayakpaul commented 2 years ago

Currently, the checkpoint during training gets serialized to the current working directory. Is it possible to change that?

Chris-hughes10 commented 2 years ago

Hi, you can do that by using the save_path argument when you create an instance of SaveBestModelCallback, as described here: https://pytorch-accelerated.readthedocs.io/en/latest/callbacks.html#pytorch_accelerated.callbacks.SaveBestModelCallback.

Hope that helps!

sayakpaul commented 2 years ago

Thank you!