Spaces:
Runtime error
Runtime error
Commit
·
b4a71b4
1
Parent(s):
eca9615
Update app.py
Browse filesmodel = mr.get_model("titanic_modal", version=1) did not work anymore
app.py
CHANGED
@@ -11,7 +11,16 @@ fs = project.get_feature_store()
|
|
11 |
|
12 |
|
13 |
mr = project.get_model_registry()
|
14 |
-
model = mr.get_model("titanic_modal", version=1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
model_dir = model.download()
|
16 |
model = joblib.load(model_dir + "/titanic_model.pkl")
|
17 |
|
|
|
11 |
|
12 |
|
13 |
mr = project.get_model_registry()
|
14 |
+
#model = mr.get_model("titanic_modal", version=1)
|
15 |
+
|
16 |
+
EVALUATION_METRIC="accuracy"
|
17 |
+
SORT_METRICS_BY="max" # your sorting criteria
|
18 |
+
|
19 |
+
# get best model based on custom metrics
|
20 |
+
best_model = mr.get_best_model("titanic_modal",
|
21 |
+
EVALUATION_METRIC,
|
22 |
+
SORT_METRICS_BY)
|
23 |
+
model = best_model
|
24 |
model_dir = model.download()
|
25 |
model = joblib.load(model_dir + "/titanic_model.pkl")
|
26 |
|