25
25
"ForTokenClassification" : "token-classification" ,
26
26
"ForSequenceClassification" : "text-classification" ,
27
27
"ForMultipleChoice" : "text-classification" ,
28
- "ForMaskedLM" : "fill-mask"
28
+ "ForMaskedLM" : "fill-mask" ,
29
29
}
30
30
LANGUAGES = ModelSearchArguments ().language
31
31
@@ -48,7 +48,7 @@ def __init__(self, output_dir: str):
48
48
self .output_dir = output_dir
49
49
self .processed_models = {}
50
50
51
- output_path = os .path .join (output_dir , "processed_models .json" )
51
+ output_path = os .path .join (output_dir , "models .json" )
52
52
if os .path .exists (output_path ):
53
53
with open (output_path , "r" ) as f :
54
54
self .processed_models = json .load (f )
@@ -90,8 +90,9 @@ def list_models(self, args: Namespace) -> List[dict]:
90
90
existing_model = self .processed_models .get (model_id )
91
91
if existing_model :
92
92
existing_model ["downloads" ] = model_info .downloads
93
- logging .info (f"Skip converted mode: { model_id } ." )
94
- continue
93
+ if not args .retry_failed :
94
+ logging .info (f"Skip converted model: { model_id } ." )
95
+ continue
95
96
96
97
try :
97
98
config = hf_hub_download (repo_id = model_id ,
0 commit comments