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}")