-
Notifications
You must be signed in to change notification settings - Fork 5
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
Automatic continuation #363
Conversation
cb1c66f
to
f79a36d
Compare
c33bcf2
to
427d3d8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a good idea. If this moves further remember to explain this well in the docs.
We aren't writing the checkpoints of the current training run in the directory where the training is started and take this file as reference. Would be a bit easier compared to searching for the latest folder...
@@ -98,6 +98,29 @@ def _prepare_train_model_args(args: argparse.Namespace) -> None: | |||
args.options = OmegaConf.merge(args.options, override_options) | |||
|
|||
|
|||
def _process_continue_from(continue_from: str) -> Optional[str]: | |||
# covers the case where `continue_from` is `auto` | |||
if continue_from == "auto": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should inform the user that the training is continued if the outputs
directory is found or maybe error or warn if continue="auto" and now directory is found.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok! It's now there
src/metatrain/cli/train.py
Outdated
if Path("outputs/").exists(): | ||
# take the latest day directory | ||
dir = sorted(Path("outputs/").iterdir())[-1] | ||
# take the latest second directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# take the latest second directory | |
# take the latest time directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also the first directory (the "day" directory) is technically "time", I'll make it clearer
Implements "automatic" continuation as described in #362.
Questions:
Contributor (creator of pull-request) checklist
📚 Documentation preview 📚: https://metatrain--363.org.readthedocs.build/en/363/