Skip to content

Commit

Permalink
Fixing stage name
Browse files Browse the repository at this point in the history
  • Loading branch information
mwiewior committed Jun 7, 2023
1 parent 83dcd45 commit 6daf8d2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions kedro_snowflake/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class SnowflakeMLflowConfig(BaseModel):
experiment_name: Optional[str]
functions: MLflowFunctionsConfig
run_id: Optional[str]
stage_name: Optional[str]
stage: Optional[str]


class SnowflakeConfig(BaseModel):
Expand Down Expand Up @@ -169,14 +169,15 @@ class KedroSnowflakeConfig(BaseModel):
- more-itertools
- openpyxl
- backoff
- pydantic
# Optionally provide mapping for user-friendly pipeline names
pipeline_name_mapping:
__default__: default
# EXPERIMENTAL: Either MLflow experiment name to enable MLflow tracking
# or leave empty
mlflow:
experiment_name: ~
stage_name: ~
stage: ~
# Snowflake external functions needed for calling MLflow instance
functions:
experiment_get_by_name: mlflow_experiment_get_by_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ snowflake:
# or leave empty
mlflow:
experiment_name: ~
stage: "MLFLOW_STAGE"
# Snowflake external functions needed for calling MLflow instance
functions:
experiment_get_by_name: mlflow_experiment_get_by_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ def log_model(model: RandomForestRegressor, X_train: pd.DataFrame, y_train: pd.S
model.fit(X_train, y_train)
session = _get_current_session()
session.file.put(f"/tmp/mlruns/{local_exp_id}/{local_run_id}/artifacts/model/*",
f"@{mlflow_config.stage_name}/{exp_id}/{run_id}/artifacts/model/",
f"{mlflow_config.stage}/{exp_id}/{run_id}/artifacts/model/",
auto_compress=False)
return model

0 comments on commit 6daf8d2

Please sign in to comment.