From 7c38f0a592784ba6136facca2c839728cee3f4c5 Mon Sep 17 00:00:00 2001 From: Michael Schuster Date: Mon, 11 Nov 2024 16:37:41 +0100 Subject: [PATCH] Fetch artifact from model version without type --- .../hp_tuning_select_best_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/steps/{% if hyperparameters_tuning %}hp_tuning{% endif %}/hp_tuning_select_best_model.py b/template/steps/{% if hyperparameters_tuning %}hp_tuning{% endif %}/hp_tuning_select_best_model.py index 028f217..1604345 100644 --- a/template/steps/{% if hyperparameters_tuning %}hp_tuning{% endif %}/hp_tuning_select_best_model.py +++ b/template/steps/{% if hyperparameters_tuning %}hp_tuning{% endif %}/hp_tuning_select_best_model.py @@ -31,7 +31,7 @@ def hp_tuning_select_best_model( best_metric = -1 # consume artifacts attached to current model version in Model Control Plane for step_name in step_names: - hp_output = model.get_data_artifact("hp_result") + hp_output = model.get_artifact("hp_result") model_: ClassifierMixin = hp_output.load() # fetch metadata we attached earlier metric = float(hp_output.run_metadata["metric"])