Skip to content

Repository files navigation

MLFlowClient.jl

StableDevBuild StatusCoverage

A Julia client for the MLflow REST API. Track experiments, log metrics and parameters, manage models, and more — directly from Julia.

Tested against MLflow 3.14.0.

Installation

using Pkg
Pkg.add("MLFlowClient")

Quick start

using MLFlowClient
# Connect to an MLflow server
mlf =MLFlow("http://localhost:5000")
# Create an experiment and a run
experiment_id =createexperiment(mlf, "my-experiment")
run =createrun(mlf, experiment_id)
# Log parameters, metrics, and tagslogparam(mlf, run, "learning_rate", "0.01")
logmetric(mlf, run, "accuracy", 0.95)
setruntag(mlf, run, "model_type", "linear")
# Complete the runupdaterun(mlf, run; status=RunStatus.FINISHED)

What's covered

MLFlowClient implements the full MLflow REST API (v2.0 and v3.0) and the Authentication REST API:

AreaOperations
ExperimentsCreate, get, search, update, delete, restore, tags
RunsCreate, get, search, update, delete, restore, tags
LoggingMetrics, parameters, batch, model, inputs
ArtifactsList, upload, download, delete, multipart upload, presigned URLs
Registered modelsCreate, get, search, rename, update, delete, tags, aliases
Model versionsCreate, get, search, update, delete, transition stage, tags
ScorersRegister, list, get, delete (v3.0)
GatewaySecrets, model definitions, endpoints, bindings, tags, budgets, guardrails (v3.0)
Prompt optimizationCreate, get, search, cancel, delete jobs (v3.0)
Label schemasCreate, get, get-by-name, list, update, delete (v3.0)
Review queuesCreate, get, list, update, delete, items add/remove/list/set-status (v3.0)
WebhooksCreate, get, list, update, delete, test
Users & RBACUsers, roles, role permissions, role assignments, user permissions (v3.0)
WorkspacesList, create, get, update, delete (v3.0, requires --enable-workspaces)

Authentication

# Basic auth
mlf =MLFlow("http://localhost:5000"; username="admin", password="password")
# Token-based auth
mlf =MLFlow("http://localhost:5000"; headers=Dict("Authorization"=>"Bearer <token>"))

Environment variables MLFLOW_TRACKING_URI, MLFLOW_TRACKING_USERNAME, and MLFLOW_TRACKING_PASSWORD are respected when set.

Documentation

See the full documentation for the complete API reference and tutorial.