Spaces:
Sleeping
Sleeping
Update functions.py
Browse files- functions.py +2 -3
functions.py
CHANGED
@@ -38,7 +38,7 @@ def decode_features(df, feature_view):
|
|
38 |
return df_res
|
39 |
|
40 |
|
41 |
-
def get_model(project, model_name, evaluation_metric, sort_metrics_by
|
42 |
"""Retrieve desired model or download it from the Hopsworks Model Registry.
|
43 |
In second case, it will be physically downloaded to this directory"""
|
44 |
TARGET_FILE = "model.pkl"
|
@@ -54,8 +54,7 @@ def get_model(project, model_name, evaluation_metric, sort_metrics_by, version_n
|
|
54 |
# get best model based on custom metrics
|
55 |
model = mr.get_best_model(model_name,
|
56 |
evaluation_metric,
|
57 |
-
sort_metrics_by
|
58 |
-
version = version_name)
|
59 |
model_dir = model.download()
|
60 |
model = joblib.load(model_dir + "/model.pkl")
|
61 |
|
|
|
38 |
return df_res
|
39 |
|
40 |
|
41 |
+
def get_model(project, model_name, evaluation_metric, sort_metrics_by):
|
42 |
"""Retrieve desired model or download it from the Hopsworks Model Registry.
|
43 |
In second case, it will be physically downloaded to this directory"""
|
44 |
TARGET_FILE = "model.pkl"
|
|
|
54 |
# get best model based on custom metrics
|
55 |
model = mr.get_best_model(model_name,
|
56 |
evaluation_metric,
|
57 |
+
sort_metrics_by)
|
|
|
58 |
model_dir = model.download()
|
59 |
model = joblib.load(model_dir + "/model.pkl")
|
60 |
|