-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_pipeline.py
33 lines (26 loc) · 1.04 KB
/
run_pipeline.py
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
28
29
30
31
32
33
import click
from pipelines.training_pipeline import ml_pipeline
from zenml.integrations.mlflow.mlflow_utils import get_tracking_uri
"""
# from zenml.integrations.mlflow.experiment_trackers import MLFlowExperimentTracker
# # Get the registered experiment tracker instance
# experiment_tracker = MLFlowExperimentTracker.get_active_instance()
"""
@click.command()
def main():
"""
Run the ML pipeline and start the MLflow UI for experiment tracking.
"""
# Run the pipeline
run = ml_pipeline()
# You can uncomment and customize the following lines if you want to retrieve and inspect the trained model:
# trained_model = run["model_building_step"] # Replace with actual step name if different
# print(f"Trained Model Type: {type(trained_model)}")
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()