-
Notifications
You must be signed in to change notification settings - Fork 36
docs: explain first-iteration training skip #394
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -945,7 +945,8 @@ def test_update_input_dict_v2_empty_list(self): | |
| ) | ||
| self.assertDictEqual(odict, self.expected_odict_v2) | ||
|
|
||
| def test_exec_v2_empty_list(self): | ||
| @patch("dpgen2.op.run_dp_train.run_command") | ||
| def test_exec_v2_empty_list(self, mocked_run): | ||
| config = self.config.copy() | ||
| config["init_model_policy"] = "no" | ||
|
|
||
|
|
@@ -989,6 +990,7 @@ def test_exec_v2_empty_list(self): | |
| jdata = json.load(fp) | ||
| self.assertDictEqual(jdata, self.expected_odict_v2) | ||
| self.assertEqual(Path(out["model"]).read_text(), "this is init model") | ||
| mocked_run.assert_not_called() | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This assertion cannot execute in any scenario where it would fail, so it does not deliver the PR body's "assert the skip path never invokes a DeePMD training or freeze command". I injected Running the same mutation against the pre-PR version of this test produces an identical failure set, via The Master's sibling test |
||
|
|
||
| os.remove(self.init_model) | ||
|
|
||
|
|
||
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.
"do_finetune"is aninputsargument, not atrainone. It is declared ininput_args()and read asconfig["inputs"].get("do_finetune", False)insubmit.py. This sentence sits in### Training, directly under the"train": {...}block, and - unlike"config","template_script"and"init_models_paths"in the same paragraph - carries no{dargs:argument}role, so a reader has no link to follow to the right section.The mistake that invites is silent.
normalize()callscheck_value(..., strict=False), so I put"do_finetune": trueunder"train"and normalization succeeded, the key was retained verbatim undertrain, andinputs.do_finetunestayed at itsFalsedefault. No error, no finetuning - and therefore the iteration-zero skip that this very sentence promises would not happen.{dargs:argument}`"do_finetune" <inputs/do_finetune>`would both fix the link and make the section obvious.