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 118
118
production_model_mse = 10000
119
119
if (metric_eval in model .tags ):
120
120
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
122
125
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, "
124
127
"exiting evaluation" )
125
128
if ((allow_run_cancel ).lower () == 'true' ):
126
129
run .parent .cancel ()
127
130
else :
128
131
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
132
136
)
133
137
)
134
138
You can’t perform that action at this time.
0 commit comments