File tree Expand file tree Collapse file tree 2 files changed +0
-52
lines changed
Expand file tree Collapse file tree 2 files changed +0
-52
lines changed Original file line number Diff line number Diff line change @@ -58,32 +58,6 @@ def _warn_descriptor_config_differences(
5858 f"with the pretrained model's configuration:\n " + "\n " .join (differences )
5959 )
6060
61- # Special warning for nlayer changes (check both top-level and nested)
62- if (
63- "nlayer" in input_descriptor
64- and "nlayer" in pretrained_descriptor
65- and input_descriptor ["nlayer" ] != pretrained_descriptor ["nlayer" ]
66- ):
67- log .warning (
68- f"IMPORTANT: nlayer changed from { input_descriptor ['nlayer' ]} to "
69- f"{ pretrained_descriptor ['nlayer' ]} . This may significantly affect "
70- f"model architecture and performance."
71- )
72-
73- # Check for nested nlayers in repformer (DPA2/DPA3 models)
74- input_repformer = input_descriptor .get ("repformer" , {})
75- pretrained_repformer = pretrained_descriptor .get ("repformer" , {})
76- if (
77- "nlayers" in input_repformer
78- and "nlayers" in pretrained_repformer
79- and input_repformer ["nlayers" ] != pretrained_repformer ["nlayers" ]
80- ):
81- log .warning (
82- f"IMPORTANT: repformer.nlayers changed from { input_repformer ['nlayers' ]} to "
83- f"{ pretrained_repformer ['nlayers' ]} . This may significantly affect "
84- f"model architecture and performance."
85- )
86-
8761
8862def get_finetune_rule_single (
8963 _single_param_target ,
Original file line number Diff line number Diff line change @@ -61,32 +61,6 @@ def _warn_descriptor_config_differences(
6161 f"with the pretrained model's configuration:\n " + "\n " .join (differences )
6262 )
6363
64- # Special warning for nlayer changes (check both top-level and nested)
65- if (
66- "nlayer" in input_descriptor
67- and "nlayer" in pretrained_descriptor
68- and input_descriptor ["nlayer" ] != pretrained_descriptor ["nlayer" ]
69- ):
70- log .warning (
71- f"IMPORTANT: nlayer changed from { input_descriptor ['nlayer' ]} to "
72- f"{ pretrained_descriptor ['nlayer' ]} . This may significantly affect "
73- f"model architecture and performance."
74- )
75-
76- # Check for nested nlayers in repformer (DPA2/DPA3 models)
77- input_repformer = input_descriptor .get ("repformer" , {})
78- pretrained_repformer = pretrained_descriptor .get ("repformer" , {})
79- if (
80- "nlayers" in input_repformer
81- and "nlayers" in pretrained_repformer
82- and input_repformer ["nlayers" ] != pretrained_repformer ["nlayers" ]
83- ):
84- log .warning (
85- f"IMPORTANT: repformer.nlayers changed from { input_repformer ['nlayers' ]} to "
86- f"{ pretrained_repformer ['nlayers' ]} . This may significantly affect "
87- f"model architecture and performance."
88- )
89-
9064
9165def get_finetune_rule_single (
9266 _single_param_target ,
You can’t perform that action at this time.
0 commit comments