mlflow

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

MLflow

MLflow

MLflow is the standard for tracking experiments. v3.0 (2025) pivots to GenAI, adding LLM Tracing, Prompt Management, and "LLM-as-a-Judge".
MLflow是实验追踪的标准工具。其2025年发布的v3.0版本转向GenAI方向,新增了LLM Tracing、Prompt Management以及"LLM-as-a-Judge"功能。

When to Use

适用场景

  • Experiment Tracking: Logging hyperparameters (
    lr=0.01
    ) and metrics (
    accuracy=0.98
    ).
  • GenAI Tracing: Visualizing the full chain of a RAG application.
  • Model Registry: Versioning models (
    my-model/v3
    ) for deployment.
  • 实验追踪:记录超参数(如
    lr=0.01
    )和指标(如
    accuracy=0.98
    )。
  • GenAI追踪:可视化RAG应用的完整链路。
  • 模型注册表:为待部署的模型(如
    my-model/v3
    )进行版本管理。

Core Concepts

核心概念

Tracking URI

追踪URI(Tracking URI)

Where logs are stored (local
./mlruns
or remote
http://mlflow-server
).
日志存储的位置,可本地存储至
./mlruns
或远程存储至
http://mlflow-server

Autologging

自动日志记录(Autologging)

mlflow.autolog()
automatically captures params from Scikit-learn, PyTorch, etc.
mlflow.autolog()
可自动捕获Scikit-learn、PyTorch等框架的参数。

LLM Tracing

LLM追踪(LLM Tracing)

OpenTelemetry-based tracing to debug prompt chains.
基于OpenTelemetry的追踪功能,用于调试提示词链路。

Best Practices (2025)

2025年最佳实践

Do:
  • Use
    mlflow.evaluate()
    : To run "LLM-as-a-Judge" metrics on your RAG pipeline.
  • Use Prompt Engineering UI: MLflow 3.0 has a UI to iterate on prompts.
Don't:
  • Don't use it for data storage: Log artifacts (models), not datasets. Log metadata about datasets instead.
建议
  • 使用
    mlflow.evaluate()
    :在你的RAG管道上运行"LLM-as-a-Judge"指标评估。
  • 使用提示词工程UI:MLflow 3.0提供了UI界面用于迭代优化提示词。
不建议
  • 不要用于数据存储:仅记录模型等工件,不要记录数据集,可改为记录数据集的元数据。

References

参考资料