Skip to content

Commit

Permalink
merged main
Browse files Browse the repository at this point in the history
  • Loading branch information
bcdurak committed Nov 7, 2024
2 parents 8e7723f + d15de14 commit 2c1a682
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions template/quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions template/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion template/steps/model_promoter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2c1a682

Please sign in to comment.