our active stack:

from zenml.client import Clientexperiment_tracker = Client().active_stack.experiment_tracker

@step(experiment_tracker=experiment_tracker.name)

def tf_trainer(...):

...

MLflow UI

MLflow comes with its own UI that you can use to find further details about your tracked experiments.

You can find the URL of the MLflow experiment linked to a specific ZenML run via the metadata of the step in which the experiment tracker was used:

from zenml.client import Client

last_run = client.get_pipeline("<PIPELINE_NAME>").last_run

trainer_step = last_run.get_step("<STEP_NAME>")

tracking_url = trainer_step.run_metadata["experiment_tracker_url"].value

print(tracking_url)

This will be the URL of the corresponding experiment in your deployed MLflow instance, or a link to the corresponding mlflow experiment file if you are using local MLflow.

If you are using local MLflow, you can use the mlflow ui command to start MLflow at localhost:5000 where you can then explore the UI in your browser.

mlflow ui --backend-store-uri <TRACKING_URL>

Additional configuration

For additional configuration of the MLflow experiment tracker, you can pass MLFlowExperimentTrackerSettings to create nested runs or add additional tags to your MLflow runs:

import mlflow

from zenml.integrations.mlflow.flavors.mlflow_experiment_tracker_flavor import MLFlowExperimentTrackerSettings

mlflow_settings = MLFlowExperimentTrackerSettings(

nested=True,

tags={"key": "value"}

@step(

experiment_tracker="<MLFLOW_TRACKER_STACK_COMPONENT_NAME>",

settings={

"experiment_tracker.mlflow": mlflow_settings

def step_one(

data: np.ndarray,

) -> np.ndarray:

...

Check out the SDK docs for a full list of available attributes and this docs page for more information on how to specify settings.

PreviousComet

NextNeptune

Last updated 19 days ago