File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
diabetes_regression/evaluate Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 118118 production_model_mse = 10000
119119 if (metric_eval in model .tags ):
120120 production_model_mse = float (model .tags [metric_eval ])
121- new_model_mse = float (run .parent .get_metrics ().get (metric_eval ))
121+ try :
122+ new_model_mse = float (run .parent .get_metrics ().get (metric_eval ))
123+ except TypeError :
124+ new_model_mse = None
122125 if (production_model_mse is None or new_model_mse is None ):
123- print ("Unable to find" , metric_eval , "metrics, "
126+ print ("Unable to find " , metric_eval , " metrics, "
124127 "exiting evaluation" )
125128 if ((allow_run_cancel ).lower () == 'true' ):
126129 run .parent .cancel ()
127130 else :
128131 print (
129- "Current Production model mse: {}, "
130- "New trained model mse: {}" .format (
131- production_model_mse , new_model_mse
132+ "Current Production model {}: {}, " .format (
133+ metric_eval , production_model_mse ) +
134+ "New trained model {}: {}" .format (
135+ metric_eval , new_model_mse
132136 )
133137 )
134138
You can’t perform that action at this time.
0 commit comments