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

Run from run_ID #68

Merged
merged 4 commits into from
Sep 17, 2021
Merged

Run from run_ID #68

merged 4 commits into from
Sep 17, 2021

Conversation

LucBourrat1
Copy link
Contributor

when launching a train after having loaded a checkpoint, parameters of the initial model were not kept and default parameters replaced them. It's fixed.
new parse argument "--nostrict" used if we want to run a model from a checkpoint, with different coefficients between the model and the model that generated the checkpoint.

@LucBourrat1 LucBourrat1 self-assigned this Sep 16, 2021
@LucBourrat1 LucBourrat1 changed the title Run from run Run from run_ID Sep 16, 2021
Copy link
Contributor

@thibo73800 thibo73800 left a comment

Choose a reason for hiding this comment

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

Beyound my last comment, it seem to me that some changes are missing for this pull request to be completed

@@ -71,6 +71,7 @@ def add_argparse_args(parent_parser, add_pl_args=True, mode="training"):
parser.add_argument("--project_run_id", type=str, help="Project related with the run ID to load")
parser.add_argument("--expe_name", type=str, default=None, help="expe_name to be logged in wandb")
parser.add_argument("--no_suffix", action="store_true", help="do not add date suffix to expe_name")
parser.add_argument("--nostrict", action="store_false", help="load from checkpoint to run a model with different weights (default True)")
Copy link
Contributor

Choose a reason for hiding this comment

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

Usually if one use --nostrict the expected behavior is : Do not strictly load the weights (store true on nostrict)
But here --nostrict set nostrict to false. It seem to me to be counter intuitive.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

now if --nostrict is specified (store True and False by default) it is possible to load a checkpoint with different keys in the load_state_dict. BUT it is still not possible for a checkpoint with same keys but different values (weights dimensions).

@thibo73800 thibo73800 merged commit 5be725d into master Sep 17, 2021
@thibo73800 thibo73800 deleted the run_from_run_id branch March 10, 2022 09:54
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