Skip to content

docs: move shared MLflow code to MLflow 3 (+ 2→3 mapping table) - #41

Merged
kengio merged 3 commits into
mainfrom
docs/mlflow3-code-refresh
Oct 26, 2026
Merged

kengio merged 3 commits into
mainfrom
docs/mlflow3-code-refresh

Conversation

@kengio

@kengio kengio commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Summary

Moves the remaining MLflow 2-era code in shared/ and labs/ to MLflow 3 and current Databricks practice (checked Oct 26, 2026). The cheat sheet now ends with an 11-row MLflow 2 → 3 mapping table.

Files

  • shared/cheat-sheets/mlflow-quick-ref.md
  • shared/code-examples/python/mlflow_patterns.md
  • shared/code-examples/python/ml_inference_examples.md
  • shared/interview-prep/15-genai-rag-design.md
  • shared/fundamentals/mlflow-basics.md
  • shared/appendix/error-messages.md
  • labs/04-mlflow-tracking.md

API changes

Each change was checked against mlflow.org or docs.databricks.com; the sources are cited in each file.

  • Logging:
    • log_model(..., artifact_path=...) → name=
    • Load and register through model_info.model_uri (models:/<model_id>)
  • Registry:
    • Unity Catalog (databricks-uc) is the MLflow 3 default
    • Three-level model names
    • Aliases (set_registered_model_alias) replace stages, which are not supported in Unity Catalog
  • Classic ML evaluation: mlflow.evaluate → mlflow.models.evaluate (mlflow.evaluate is deprecated in 3.0)
  • GenAI evaluation:
    • mlflow.evaluate(model_type="question-answering") with mlflow.metrics.* → mlflow.genai.evaluate(data, predict_fn, scorers)
    • Built-in scorers: Correctness, RelevanceToQuery, Guidelines, Safety, RetrievalGroundedness, RetrievalRelevance
    • Custom scorers with @scorer
    • Deployed endpoints evaluated via to_predict_fn("endpoints:/...")
  • Tracing: @mlflow.trace, SpanType.RETRIEVER, start_span, autolog
  • Agents:
    • ResponsesAgent example
    • databricks.agents.deploy marked legacy (Oct 5, 2026), with a pointer to the Agent Bricks CLI
  • Serving: ServedModelInput → ServedEntityInput; fixes a pre-existing syntax error in that snippet

Verification

  • markdownlint: 0 errors on modified files
  • All 73 Python code blocks parse (ast)
  • 0 broken relative links repo-wide
  • 3-round self-review

Notes

  • The SDK Route class still documents served_model_name, so it is kept.
  • The example model is renamed fraud-detector → fraud_detector, because hyphenated UC names need backtick quoting.

🤖 Generated with Claude Code

@kengio
kengio merged commit beff45a into main Oct 26, 2026
2 checks passed
@kengio
kengio deleted the docs/mlflow3-code-refresh branch October 26, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant