@@ -66,7 +66,7 @@ def parse_file_name(filename):
6666def load_known_data (issue_file ):
6767 """Load known test data from JSON file."""
6868 try :
69- with open (issue_file , 'r' , encoding = 'utf-8' ) as file :
69+ with open (issue_file , encoding = 'utf-8' ) as file :
7070 return json .load (file )
7171 except (FileNotFoundError , json .JSONDecodeError ) as e :
7272 print (f"Error loading known data from { issue_file } : { e } " )
@@ -91,8 +91,7 @@ def update_reference_dataframe(refer_data, model_name, dtype, accuracy):
9191 refer_data .loc [mask , dtype ] = accuracy
9292 else :
9393 new_row = {'name' : model_name , dtype : accuracy }
94- refer_data = pd .concat ([refer_data , pd .DataFrame ([new_row ])],
95- ignore_index = True )
94+ refer_data = pd .concat ([refer_data , pd .DataFrame ([new_row ])], ignore_index = True )
9695 return refer_data
9796
9897
@@ -155,22 +154,14 @@ def main():
155154 description = "Accuracy Check" ,
156155 formatter_class = argparse .ArgumentDefaultsHelpFormatter
157156 )
158- parser .add_argument ("--driver" , type = str , default = "rolling" ,
159- help = "rolling or lts" )
160- parser .add_argument ("--category" , type = str , default = "inductor" ,
161- help = "inductor" )
162- parser .add_argument ("--suite" , type = str , required = True ,
163- help = "huggingface, timm_models or torchbench" )
164- parser .add_argument ("--mode" , type = str , required = True ,
165- help = "inference or training" )
166- parser .add_argument ("--dtype" , type = str , required = True ,
167- help = "float32, bfloat16, float16, amp_bf16 or amp_fp16" )
168- parser .add_argument ("--csv_file" , type = str , required = True ,
169- help = "Test results CSV file path" )
170- parser .add_argument ("--issue_file" , type = str , required = True ,
171- help = "Known test data JSON file path" )
172- parser .add_argument ('--update' , action = 'store_true' ,
173- help = "Whether to update new pass and new failed info" )
157+ parser .add_argument ("--driver" , type = str , default = "rolling" , help = "rolling or lts" )
158+ parser .add_argument ("--category" , type = str , default = "inductor" , help = "inductor" )
159+ parser .add_argument ("--suite" , type = str , required = True , help = "huggingface, timm_models or torchbench" )
160+ parser .add_argument ("--mode" , type = str , required = True , help = "inference or training" )
161+ parser .add_argument ("--dtype" , type = str , required = True , help = "float32, bfloat16, float16, amp_bf16 or amp_fp16" )
162+ parser .add_argument ("--csv_file" , type = str , required = True , help = "Test results CSV file path" )
163+ parser .add_argument ("--issue_file" , type = str , required = True , help = "Known test data JSON file path" )
164+ parser .add_argument ('--update' , action = 'store_true' , help = "Whether to update new pass and new failed info" )
174165
175166 args = parser .parse_args ()
176167
0 commit comments