GIanlucaRub commited on
Commit
da1c471
1 Parent(s): b6ae36b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -11,7 +11,15 @@ fs = project.get_feature_store()
11
 
12
 
13
  mr = project.get_model_registry()
14
- model = mr.get_model("iris_modal", version=1)
 
 
 
 
 
 
 
 
15
  model_dir = model.download()
16
  model = joblib.load(model_dir + "/iris_model.pkl")
17
 
 
11
 
12
 
13
  mr = project.get_model_registry()
14
+ #model = mr.get_model("iris_modal", version=1)
15
+ EVALUATION_METRIC="accuracy"
16
+ SORT_METRICS_BY="max" # your sorting criteria
17
+
18
+ # get best model based on custom metrics
19
+ best_model = mr.get_best_model("iris_modal",
20
+ EVALUATION_METRIC,
21
+ SORT_METRICS_BY)
22
+ model = best_model
23
  model_dir = model.download()
24
  model = joblib.load(model_dir + "/iris_model.pkl")
25