Skip to content

Instantly share code, notes, and snippets.

@christopherwoodall
Created September 12, 2023 15:08
Show Gist options
  • Save christopherwoodall/d858ee31be4ca18c0b5fc9bbd233d49e to your computer and use it in GitHub Desktop.
Save christopherwoodall/d858ee31be4ca18c0b5fc9bbd233d49e to your computer and use it in GitHub Desktop.
MLFLow Python API
# pip install mlflow
import mlflow
from mlflow.tracking import MlflowClient
mlflow.set_tracking_uri("http://your-mlflow-server-uri")
client = MlflowClient()
experiments = client.list_experiments()
experiment = client.get_experiment_by_name("Your Experiment Name")
runs = client.search_runs(experiment_ids=[experiment.experiment_id])
for key, value in run_params.items():
print(f"Parameter: {key}, Value: {value}")
for key, value in run_metrics.items():
print(f"Metric: {key}, Value: {value}")
for key, value in run_tags.items():
print(f"Tag: {key}, Value: {value}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment