CLAUDE.md · mlflow/mlflow
CLAUDE.md from mlflow/mlflow: 241 lines covering Knowledge Cutoff Note, Code Style Principles, Repository Overview, Quick Start: Development Server and more.
Template by mlflow
Install
Works with Claude Code. Read the repository before you give any tool access to your data.
curl -fsSL https://raw.githubusercontent.com/mlflow/mlflow/master/CLAUDE.md -o CLAUDE.md
Read it and adapt it to your project before use.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: prompt-engineering
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
What's in it
A CLAUDE.md file: project memory Claude Code loads at the start of every session.
- For
- Claude Code
- Length
- 241 lines
- File
CLAUDE.md
Sections
- Knowledge Cutoff Note
- Code Style Principles
- Repository Overview
- Quick Start: Development Server
- Debugging
- Development Commands
- Important Files
- Common Development Tasks
- Git Workflow
- Pre-commit Hooks
First lines (shown under the repo's Apache-2.0 license)
# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Knowledge Cutoff Note Claude's training data may lag behind current releases. When reviewing docs or code, don't flag unfamiliar names as speculative or non-existent. Assume the authors are referencing newer, valid resources (e.g., model names like GPT-5, GitHub runner types like ubuntu-slim, library versions, etc.). ## Code Style Principles - Use top-level imports (only use lazy imports when necessary) - Only add docstrings in tests when they provide additional context - Only add comments that explain non-obvious logic or provide additional context - In source files, use full `https://github.com/<owner>/<repo>/issues/<number>` URLs for cross-repository issue references instead of `<owner>/<repo>#<number>`, because the shorthand does not autolink or identify the target type; it remains fine in PR descriptions and issue comments, where GitHub autolinks it. - When touching the SQLAlchemy tracking store, keep all workspace-aware paths and validations intact; never drop workspace plumbing even if the change focuses on single-tenant behavior - New functionality in the tracking layer should be mirrored by workspace-aware tests (e.g., add workspace variants in `tests/store/tracking/test_sqlalchemy_store_workspace.py` when applicable) ## Repository Overview MLflow is an open-source platform for managing the end-to-end machine learning lifecycle. It provides tools for: - Experiment tracking - Model versioning and deployment - LLM observability and tracing - Model evaluation - Prompt management ## Quick Start: Development Server ### Start the Full Development Environment (Recommended) ```bash # Start both MLflow backend and React frontend dev servers LOG=$(mktemp) && echo "Logs: $LOG" uv run dev/run_dev_server.py > "$LOG" 2>&1 & # Monitor the logs (server URLs are printed there) tail -f "$LOG" ``` ### Reviewing provider-gated UI without credentials Features gated on an external provider/credentials can be rendered without real keys, cost, or nondeterminism via credential-free stubs (see `dev/dev_stubs/`): ```bash uv run dev/run_dev_server.py --stub-providers claude ``` - `claude` — a fake `claude` CLI on the dev server's PATH, so the MLflow Assistant's Claude Code provider passes its auth probe and the chat panel renders without `ANTHROPIC_API_KEY`. The stubs are dev/CI-only; the `ui-review` bot always passes `--stub-providers claude` so the Assistant is reviewable on any PR. ## Debugging For debugging errors, enable debug logging (must be set before importing mlflow): ```bash export MLFLOW_LOGGING_LEVEL=DEBUG ``` ### Start Development Server with Databricks Backend To run the MLflow dev server that proxies requests to a Databricks workspace: ```bash # IMPORTANT: All four environment variables below are REQUIRED for proper Databricks backend operation # Set them in this exact order: export DATABRICKS_HOST="https://your-workspace.databricks.com" # Your Databricks workspace URL export DATABRICKS_TOKEN="your-databricks-token" # Your Databricks personal access token export MLFLOW_TRACKING_URI="databricks" # Must be set to "databricks" export MLFLOW_REGISTRY_URI="databricks-uc" # Use "databricks-uc" for Unity Catalog, or "databricks" for workspace model registry # Start the dev server with these environment variables (unique log per invocation) LOG=$(mktemp) && echo "Logs: $LOG" uv run dev/run_dev_server.py > "$LOG" 2>&1 & # Monitor the logs (server URLs are printed there) tail -f "$LOG" ``` **Note**: The MLflow server acts as a proxy, forwarding API requests to your Databricks workspace while serving the local React frontend. This allows you to develop and test UI changes against real Databricks data. ## Development Commands ### Package Cooldown Period 7-day cooldown on new package releases to guard against compromised or broken versions that get pulled and yanked within a few days. Keep these in sync: - Python: `exclude-newer = "P7D"` in `pyproject.toml` (`torch`/`torchvision` opted out). - JavaScript: `min-release-age=7` in `.npmrc`; `npmMinimalAgeGate: 7d` in `.yarnrc.yml`. Pass `--min-release-age=7` to any new `npx` invocations. ### Testing ```bash # First-time setup: Install test dependencies uv sync uv pip install -r requirements/test-requirements.txt # Run Python tests uv run pytest tests/ # Run specific test file uv run pytest tests/test_version.py # Run tests with specific package versions uv run --with 'abc==1.2.3,xyz==4.5.6' pytest tests/test_version.py # Run tests with optional dependencies/extras uv run --with transformers pytest tests/transformers uv run --extra gateway pytest tests/gateway ``` ### Special Testing ```bash # Run tests with minimal dependencies (skinny client) uv run bash dev/run-python-skinny-tests.sh ``` ### Documentation ```bash # Build documentation site (needs gateway extras for API doc generation) uv run --all-extras bash dev/build-docs.sh --build-api-docs # Build with R docs included uv run --all-extras bash dev/build-docs.sh --build-api-docs --with-r-docs # Serve documentation locally (after building) cd docs && npm run serve --port 8080 ``` ## Important Files - `pyproject.toml`: Package configuration and tool settings - `.python-version`: Minimum Python version (3.10) - `requirements/`: Dependency specifications - `mlflow/ml-package-versions.yml`: Supported ML framework versions ## Common Development Tasks ### Modifying the UI For frontend development (React, TypeScript, UI components), see [mlflow/server/js/CLAUDE.md](./mlflow/server/js/CLAUDE.md) which covers: - Development server setup with hot reload - Available yarn scripts (testing, linting, formatting, type checking) - UI components and design system usage - Project structure and best practices ## Git Workflow ### Committing Changes
Signals
- Stars
- 28,516
- Last commit
- Oct 24, 2026 (4 days ago)
Details
- License
- Apache-2.0
- Repository
- github.com/mlflow/mlflow
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHub
Cite this page
CLAUDE.md · mlflow/mlflow. Agent Mart. https://agentmart.dev/templates/mlflow-mlflow-claude-md (last updated 2026-10-24)