Created
September 12, 2023 15:08
-
-
Save christopherwoodall/d858ee31be4ca18c0b5fc9bbd233d49e to your computer and use it in GitHub Desktop.
MLFLow Python API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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