diff --git a/template/quickstart.ipynb b/template/quickstart.ipynb index d26a4b1..93eb54d 100644 --- a/template/quickstart.ipynb +++ b/template/quickstart.ipynb @@ -982,8 +982,8 @@ "@pipeline\n", "def inference(preprocess_pipeline_id: UUID):\n", " \"\"\"Model batch inference pipeline\"\"\"\n", - " # random_state = client.get_artifact_version(name_id_or_prefix=preprocess_pipeline_id).metadata[\"random_state\"].value\n", - " # target = client.get_artifact_version(name_id_or_prefix=preprocess_pipeline_id).run_metadata['target'].value\n", + " # random_state = client.get_artifact_version(name_id_or_prefix=preprocess_pipeline_id).metadata[\"random_state\"]\n", + " # target = client.get_artifact_version(name_id_or_prefix=preprocess_pipeline_id).run_metadata['target']\n", " random_state = 42\n", " target = \"target\"\n", "\n", diff --git a/template/run.py b/template/run.py index 539ddd0..91ba876 100644 --- a/template/run.py +++ b/template/run.py @@ -207,8 +207,8 @@ def main( # Use the metadata of feature engineering pipeline artifact # to get the random state and target column - random_state = preprocess_pipeline_artifact.run_metadata["random_state"].value - target = preprocess_pipeline_artifact.run_metadata["target"].value + random_state = preprocess_pipeline_artifact.run_metadata["random_state"] + target = preprocess_pipeline_artifact.run_metadata["target"] run_args_inference["random_state"] = random_state run_args_inference["target"] = target diff --git a/template/steps/model_promoter.py b/template/steps/model_promoter.py index 1cdbf9a..d24b9b0 100644 --- a/template/steps/model_promoter.py +++ b/template/steps/model_promoter.py @@ -48,7 +48,6 @@ def model_promoter(accuracy: float, stage: str = "production") -> bool: prod_accuracy = ( stage_model.get_artifact("sklearn_classifier") .run_metadata["test_accuracy"] - .value ) if float(accuracy) > float(prod_accuracy): # If current model has better metrics, we promote it