RUNLOCALAIv38
->Will it run?Best GPUCompareTroubleshootStartLearnPulseModelsHardwareToolsBench
Run check
RUNLOCALAI

Independently operated catalog for local-AI hardware and software. Hand-written verdicts. Source-cited claims. Reproducible commands when we have them.

OP·Eruo Fredoline
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
TOOLS
  • Will it run?
  • Compare hardware
  • Cost vs cloud
  • Choose my GPU
  • Prompting kits
  • Quick answers
REF
  • All buyer guides
  • Learn local AI
  • Methodology
  • Glossary
  • Errors KB
  • Trust
EDITOR
  • About
  • Author
  • How we make money
  • Editorial policy
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

© 2026 runlocalai.coIndependently operated
RUNLOCALAI · v38
  1. >
  2. Home
  3. /Learn
  4. /Courses
  5. /MLOps for Local AI
  6. /Ch. 3
MLOps for Local AI

03. MLflow Setup

Chapter 3 of 24 · 20 min
KEY INSIGHT

The tracking URI determines where data goes. `mlflow.set_tracking_uri()` controls this. Without explicit configuration, MLflow writes to `./mlruns` locally. Explicit configuration enables sharing across processes and future migration. Configuration happens in code or environment variables: ```python import os # Option 1: Environment variable os.environ["MLFLOW_TRACKING_URI"] = "sqlite:///mlflow.db" # Option 2: Explicit in code import mlflow mlflow.set_tracking_uri("sqlite:///mlflow.db") ``` The SQLite backend stores experiments in a local file. This works for single machines but doesn't scale beyond one operator. For collaborative environments, a server-based approach (covered in the next chapter) is necessary. Backend store configuration options: | URI | Backend | Use Case | |-----|---------|----------| | `./mlruns` | Filesystem | Development, single user | | `sqlite:///mlflow.db` | SQLite | Single machine, light load | | `postgresql://host/db` | PostgreSQL | Multi-user, production | MLflow also captures the execution environment. It logs installed packages automatically, ensuring you can reproduce the software context later.

MLflow is the open-source standard for local MLOps. It provides four components: Tracking (experiment logging), Models (model packaging), Model Registry (version management), and Projects (reproducible runs). For local AI, you need at minimum the Tracking component.

Installation is straightforward:

pip install mlflow

That's the core package. Additional components for specific needs:

pip install mlflow[extras]  # Includes sqlalchemy for database backend
pip install mlflow[typecheck]  # Type validation

For production use, you'll want a database backend. SQLite suffices for single-user local setups; PostgreSQL for multi-user or high-volume scenarios.

Local verification checkpoint

Run the smallest example from this chapter in a local workspace and record the package version, runtime, data path, and observed output. If the result depends on model size, vector count, CPU/GPU backend, or available memory, note that constraint beside the exercise so the lesson remains reproducible.

EXERCISE

Install MLflow and configure it with a SQLite backend. Run three experiment variations (different hyperparameters) and verify all runs appear in the backend store. Check the SQLite file directly with sqlite3 mlflow.db ".schema".

← Chapter 2
Experiment Tracking
Chapter 4 →
MLflow Tracking Server