@@ -173,6 +173,9 @@ def parse(args):
173173 a ('--check' , action = 'store_true' , default = '' ,
174174 help = 'Run a check pass, not actually evaluating' )
175175
176+ a ('--skip-stats' , action = 'store_true' , default = '' ,
177+ help = 'Do not compute on-device stats' )
178+
176179 a ('--out' , dest = 'results_dir' , default = './data/results' ,
177180 help = '%(default)s' )
178181
@@ -223,9 +226,10 @@ def get_stats(row):
223226 layer_info .to_csv (layer_info_path )
224227 return pandas .Series (model_stats )
225228
226- model_stats = best .groupby (level = 'experiment' ).apply (get_stats )
227- print ('Model stats\n ' , model_stats )
228- model_stats .to_csv (os .path .join (out_dir , 'stm32stats.csv' ))
229+ if not args .skip_stats :
230+ model_stats = best .groupby (level = 'experiment' ).apply (get_stats )
231+ print ('Model stats\n ' , model_stats )
232+ model_stats .to_csv (os .path .join (out_dir , 'stm32stats.csv' ))
229233
230234 print ('Testing models...' )
231235 results = evaluate (best , folds , predictor = predict , out_dir = out_dir , dry_run = args .check )
0 commit comments