-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_pipeline.py
More file actions
27 lines (22 loc) · 804 Bytes
/
run_pipeline.py
File metadata and controls
27 lines (22 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import click
from pipelines.training_pipeline import ml_pipeline
from zenml.integrations.mlflow.mlflow_utils import get_tracking_uri
@click.command()
def main():
"""
Run the ML pipeline and start the MLflow UI for experiment tracking.
"""
# Run the pipeline
run = ml_pipeline()
# Retrieve the output of the model_building_step
trained_model = run.steps["model_building_step"].outputs["sklearn_pipeline"]
print(f"Trained Model Type: {type(trained_model)}")
# Print MLflow UI instructions
print(
"Now run \n "
f" mlflow ui --backend-store-uri '{get_tracking_uri()}'\n"
"To inspect your experiment runs within the mlflow UI.\n"
"You can find your runs tracked within the experiment."
)
if __name__ == "__main__":
main()