jcardena.com Blog MLflow when you're a team of one
145 posts
EN ES

MLflow when you're a team of one

AI

MLOps tools feel like overkill for one person, but MLflow provides a crucial, low-overhead discipline for solo model development, ensuring reproducibility and sanity.

The project folder tells a familiar story. train_v1.ipynb, train_v2_fixed.ipynb, and the inevitable train_v2_final_actually_works.ipynb. Alongside them live a handful of pickled models and a nagging uncertainty about which notebook generated which file. I've lived in this directory more times than I care to admit. It’s the default state for a team of one moving at full speed.

In software, Git solves this for code. But a model isn't just code. It's the unique combination of code, hyperparameters, environment, and the specific data it was trained on. Git tracks the script, but the resulting artifact is an orphan. The lack of discipline for the model itself always comes back to bite you.

Code Versioning Is Not Enough

Committing your training script is necessary, but it's insufficient for reproducibility. I fell into this trap early on, running a perfectly versioned script a dozen times with different learning rates tweaked on the command line. A week later, I had a fantastic result and no clear record of how I got there. Was it learning_rate=0.01 or 0.001? Was it the 10,000-row data sample or the 100,000-row one? The answer was lost to shell history.

When a model in production starts behaving strangely six months after deployment, the first question is always, "How do I rebuild the exact artifact that's running?" If the answer involves archaeology, you have a critical vulnerability in your system.

Start RunLog Params andConfigExecute TrainScriptLog Metrics andArtifactsEnd Run
Core MLflow Tracking Loop

A Minimal, Effective Discipline

This is where a tool like MLflow provides an immediate return on a tiny investment. It starts with a few lines of code that act as a disciplined lab notebook. As detailed in the MLflow Tracking documentation, the core loop is simple: you wrap your training code in an "experiment run" and explicitly log what Git ignores:

  • Parameters: The knobs you're turning, like learning rates or layer sizes, using mlflow.log_param().
  • Metrics: The results you care about, like validation accuracy or loss, using mlflow.log_metric().
  • Artifacts: The output files themselves, like the model object or a confusion matrix, using mlflow.log_artifact().

The overhead is trivial, but the result is a permanent, queryable record of every single experiment. The chaos of filenames is replaced by a structured log.

From Messy Research to Clean Release

Logging everything is the first step. The second is separating signal from noise. Most experiments fail; you might run a hundred trials to find one model worth promoting. The MLflow Model Registry is the tool for this.

The registry is a clean room, a curated list of model versions "blessed" for the next stage. When an experiment yields a promising artifact, you formally register it, giving it a name like invoice-classifier and a version number. This act of promotion is a powerful architectural pattern. It decouples the messy, iterative work of R&D from the stable, deterministic world of production. Your deployment pipeline no longer pulls a loose file; it requests invoice-classifier/production from the registry. This indirection provides control, auditability, and the ability to roll back safely.

The Right-Sized Stack

The fear with any new tool is the setup cost. But you don't need to build a Kubernetes-hosted platform with feature stores and multiple databases. MLflow's beauty is its scalability. By default, it writes to a local mlruns directory on your filesystem. That's it.

When you need a central, persistent server, the next step isn't a cloud deployment. It's often a single SQLite database file, launched with mlflow server --backend-store-uri sqlite:///mlflow.db. This tiny setup gives you 80% of the value for 2% of the effort. The point is to match operational complexity to your scale. For a solo architect, a local file or database is more than enough to enforce the discipline that prevents future disasters.

Why Not Just a Text File?

Of course, this isn't the only way. You could enforce a convention of logging results to a JSON file, or use a tool like DVC for a more Git-native approach to data and model versioning. Those are valid patterns. For me, MLflow hits a sweet spot for the model selection phase. Its web UI, which comes out of the box, is purpose-built for comparing the metrics and parameters of dozens of runs. This visual comparison layer is where it earns its keep over a simple log file.

It's overkill for a one-off exploratory notebook that will never be run again. But the moment a model has a chance of being used by another system, the tiny setup cost pays for itself. It establishes the reliable, deterministic foundation that any future work, especially more experimental agentic systems, will depend on.

INPUTSRaw Data SourceTraining ScriptsHyperparametersDISCIPLINED DEVELOPMENTMLflow TrackingServerExperiment RunsModel RegistryDETERMINISTIC DEPLOYMENTCI CD PipelineStagingEnvironmentProduction API
Architecture for Reproducible Model Serving

A Favor to Your Future Self

Using a tool like this when you're working alone isn't about process for its own sake. It’s a practical act of self-preservation. Six months from now, instead of deciphering cryptic filenames, you’ll have a clean UI that can instantly answer which model is running, what its metrics were, and how to retrieve the exact artifact. This is the unglamorous work of craftsmanship that separates a durable system from a script that becomes a write-only liability the moment you look away.

Start with the simplest thing that works: a local mlruns directory. Separate experimentation in the tracker from deployment candidates in the registry. Think of it not as overhead, but as version control for the entire modeling process. It's the boring pattern that lets you sleep at 3am.

JC
Juan Cardena
Enterprise Architect, Data & AI

Enterprise architect with 25 years across web, software, data, and AI. MIT CDAO ’25. Writing on agentic AI in production.