Zum Inhalt springen

Lektion 26 · Projects and Reference

MLflow Glossary and Cheat Sheet

A quick MLflow reference: key terms, Python calls for tracking, models, registry, evaluation and tracing, common commands, URIs and a release checklist.

Use this page as a quick reference while you work. The calls reflect MLflow 3 as of December 2026. Check the official API reference for your version before you rely on an argument.

Glossary

Term Meaning
Experiment A named container for runs about one task
Run One execution that records data
Parameter A fixed input setting, stored as text
Metric A numeric result, optionally with a step
Tag A key and value label
Artifact A file attached to a run
Backend store The database or store for metadata
Artifact store Storage for files
Flavor A convention for saving and loading a model
pyfunc The common Python predict interface
Signature The schema for inputs, outputs and params
Registered model A named model with versions
Alias A movable pointer to a version
Scorer A function or judge that grades output
Judge A scorer that uses a language model
Trace The record of one request
Span One step inside a trace
Expectation The ground truth for a good result
Feedback An assessment attached to a trace

Tracking

Python
mlflow.set_tracking_uri("sqlite:///mlflow.db")
mlflow.set_experiment("name")
with mlflow.start_run(run_name="x", nested=False):
    mlflow.log_params({"depth": 6})
    mlflow.log_metric("loss", 0.4, step=1)
    mlflow.set_tags({"owner": "team"})
    mlflow.log_artifact("report.html")
    mlflow.log_dict({"a": 1}, "config.json")

mlflow.autolog()
mlflow.search_runs(experiment_names=["name"],
                   filter_string="metrics.loss < 0.5",
                   order_by=["metrics.loss ASC"])

Models and registry

Python
info = mlflow.sklearn.log_model(model, name="m", input_example=X.head(3))
mlflow.pyfunc.load_model(info.model_uri)
mlflow.register_model(info.model_uri, "my-model")
MlflowClient().set_registered_model_alias("my-model", "champion", "1")
mlflow.pyfunc.load_model("models:/my-model@champion")

Evaluation, tracing and prompts

Python
mlflow.models.evaluate(model_uri, data=df, targets="label", model_type="classifier")
mlflow.genai.evaluate(data=rows, predict_fn=fn, scorers=[my_scorer])

@mlflow.trace
def step(x):
    return x

with mlflow.start_span(name="block") as span:
    span.set_inputs({"x": 1})

mlflow.anthropic.autolog()
mlflow.genai.register_prompt(name="p", template="Hi {{ name }}")
mlflow.genai.load_prompt("prompts:/p@production")

Commands

Command Use
mlflow server --port 5000 Start the UI and tracking API
mlflow db upgrade <url> Update the database schema (back up first)
mlflow run . -P key=value Run a project
mlflow models predict -m <uri> -i file.csv -t csv Test a model
mlflow models serve -m <uri> -p 5001 Serve locally
mlflow models build-docker -m <uri> -n <name> Build an image
mlflow gc Permanently remove deleted items

URI shapes

URI Points to
models:/<model_id> A logged model (MLflow 3)
models:/<name>/<version> A registered version
models:/<name>@<alias> A registered alias
prompts:/<name>/<version> A prompt version
prompts:/<name>@<alias> A prompt alias

Practice: sort the vocabulary

Python Stand-in: a quick vocabulary drill

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Release checklist

  1. Data version, code commit and seed are recorded.
  2. Selection rules were written before comparing.
  3. Evaluation passed its thresholds, including for important groups.
  4. The model has a signature and tested dependencies.
  5. No secrets or unapproved personal data are in runs, artifacts or traces.
  6. A person approved the release.
  7. The previous version is noted for rollback.
  8. Live monitoring is in place.

Troubleshooting

Symptom Likely cause
Run missing in the UI Different tracking URIs
Search on a number parameter fails Parameter values are text and need quotes
Model fails to load The environment lacks required packages
Saving a scikit-learn model reports untrusted types The skops format needs skops_trusted_types; add only types you have reviewed
Requests are rejected Input does not match the signature
Invalid Host header The domain is not in the allowed hosts
Alias change not visible The service or a cache still holds the old value

Copying a command without reading it is risky, above all for mlflow gc and mlflow db upgrade. Both change stored data. Back up first.

This tutorial is independent and is not affiliated with the MLflow project or any vendor. Use the official documentation for authoritative, current details. To keep learning, explore AI agents and generative AI.

Which tool for which question

Your question Start here
Which settings gave the best score? Searching runs
What does this model expect? Signatures
Which version is live? Aliases
Is the new model good enough? Evaluation
Why did the app answer wrongly? Tracing
Which prompt text ran? Prompt registry
How do others reach my runs? Tracking server

Pick the row that matches your problem, then read that lesson again with your own project in mind.

What to learn next

Build something small of your own and apply one idea at a time: tracking first, then a registered model, then evaluation. When these feel natural, add a shared server and automation. Read the release notes when you upgrade, because MLflow changes quickly and the official documentation is the final authority for your version.

Final advice

Start small. Record every run, name things clearly, keep secrets out, and write your rules before you look at results. Check important numbers by hand, keep a person in charge of releases, and revisit your setup as your project grows. These habits will stay useful even when commands and screens change.

Check your understanding

Quick check · 3 questions

of 3 answered You scored / 3 · perfect!

  1. 1. Which URI selects a registered model by alias?

    The at sign selects an alias of a registered model.
  2. 2. Which command permanently removes deleted runs?

    gc is the cleanup command. Back up before you use it.
  3. 3. What is a span?

    Spans are the building blocks of traces.

Summary

  • Keep this page for terms, calls, commands and URI shapes.
  • Check arguments against the docs for your version.
  • Use the release checklist before you promote a model or a prompt.

Next: MLflow tutorial overview

Dein Fortschritt wird in diesem Browser gespeichert. Kein Konto nötig.