From 84a5f1dc08bd770b2e3b3ddef5d0039f2f1c007a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 09:19:49 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- deepmd/pt/entrypoints/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deepmd/pt/entrypoints/main.py b/deepmd/pt/entrypoints/main.py index d9b08319b4..27636ddd63 100644 --- a/deepmd/pt/entrypoints/main.py +++ b/deepmd/pt/entrypoints/main.py @@ -326,7 +326,9 @@ def main(args: Optional[Union[List[str], argparse.Namespace]] = None): model_params = state_dict["_extra_state"]["model_params"] finetune_from_multi_task = "model_dict" in model_params # Pretrained model must be multitask mode - assert finetune_from_multi_task, "Error: The '--list-model-branch' option requires \ + assert ( + finetune_from_multi_task + ), "Error: The '--list-model-branch' option requires \ a multitask pretrained model. The provided model does not meet this criterion" model_branch = list(model_params["model_dict"].keys()) log.info(f"Available model branches are {model_branch}")