From 6a1da78395d40589cf9f54539a425e5c7798bf21 Mon Sep 17 00:00:00 2001 From: Chenqqian Zhang <100290172+Chengqian-Zhang@users.noreply.github.com> Date: Wed, 27 Mar 2024 17:58:11 +0800 Subject: [PATCH] Fix bug in `preprocess_shared_params` when using non-zero share level Signed-off-by: Chenqqian Zhang <100290172+Chengqian-Zhang@users.noreply.github.com> --- deepmd/pt/utils/multi_task.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deepmd/pt/utils/multi_task.py b/deepmd/pt/utils/multi_task.py index 5f06d93208..e2076b3b2b 100644 --- a/deepmd/pt/utils/multi_task.py +++ b/deepmd/pt/utils/multi_task.py @@ -115,7 +115,7 @@ def replace_one_item(params_dict, key_type, key_in_dict, suffix="", index=None): type_map_keys.append(key_in_dict) else: if shared_key not in shared_links: - class_name = get_class_name(shared_type, shared_dict[key_in_dict]) + class_name = get_class_name(shared_type, shared_dict[shared_key]) shared_links[shared_key] = {"type": class_name, "links": []} link_item = { "model_key": model_key,