Skip to content

latent.mlflow.wrapper

Safe MLFlow wrapper that automatically handles active run checks.

This module provides the same interface as mlflow but gracefully handles cases where no active run exists (e.g., when tasks execute outside the flow's MLFlow context).

Usage: from evals.prefect_utils import mlflow

mlflow.log_metric("key", value)  # Safe - checks for active run
mlflow.log_param("key", value)   # Safe - checks for active run

Attributes

MlflowClient

active_run

end_run

get_experiment

get_experiment_by_name

langchain

litellm

log_artifact

log_artifacts

log_metric

log_metrics

log_param

log_params

set_experiment

set_tag

set_tags

set_tracking_uri

start_run

start_span