Cheat sheet · Specialise
MLflow cheat sheet
Opens with creditsA quick-revision book on MLflow in Python for engineers who train, compare, ship and monitor models. It follows a model's life: tracking experiments, packaging models, registering and promoting them with aliases, serving and evaluating them, tracing GenAI apps, and the habits that make ML work reproducible.
Chapters
9 chapters · 65 concepts
1Tracking experimentsExperiments, runs and what you log to them: parameters, metrics, tags, artefacts and datasets.8 concepts
- 1What MLflow isAn open-source platform for the machine learning life cycle: tracking experiments, packaging models, a model registry, serving, evaluation, and tracing for…
- 2Experiments and runsA run is one execution of training or evaluation code.
- 3ParametersInputs to a run, such as hyperparameters and settings, stored as strings.
- 4MetricsNumeric results logged over time.
- 5TagsFree-form key-value labels on runs, experiments and models.
- 6ArtefactsOutput files attached to a run: plots, reports, feature lists, model files, sample predictions.
- 7Dataset tracking
mlflow.datawraps a DataFrame or table with its source, name, digest and schema;log_inputrecords it on the run with a context such as training or… - 8System metricsWith
log_system_metrics=Trueon a run (thepsutilpackage is needed, plusnvidia-ml-pyfor GPUs), MLflow samples CPU, memory, disk and GPU use during…
8 in this chapterOpen this chapter2Autologging, search and the UICapturing runs with one line, organising hyperparameter searches, and finding the best run in code or in the UI.7 concepts
- 1Autologging
mlflow.autolog()hooks into supported libraries such as scikit-learn, XGBoost, LightGBM, PyTorch Lightning and Keras, and logs parameters, metrics and the… - 2Library-specific autologEach integration also has its own
autolog, such asmlflow.sklearn.autolog(), with options likelog_models,log_datasetsanddisable. - 3Nested runsRuns started with
nested=Trueinside another run become its children, and the UI groups them under the parent. - 4Searching runs
mlflow.search_runsreturns a pandas DataFrame of runs matching a SQL-like filter on metrics, params, tags and attributes, in the order you ask. - 5MlflowClientThe lower-level API for reading and editing runs, experiments, metric histories and registered models by id.
- 6The MLflow UIA web app listing experiments and runs, with metric charts, side-by-side run comparison, parallel coordinates plots, artefact browsing, models and traces.
- 7Organising runsClear experiment names, meaningful run names and consistent tags, plus descriptions on experiments explaining the question being explored.
7 in this chapterOpen this chapter- 1Autologging
- Tracking server and storesWhere runs and files live, and how to run a shared tracking server for a team.7 conceptsOpens with credits
- Models, flavours and signaturesThe MLflow Model format: how models are logged with their environment and schema, and loaded anywhere through one interface.9 conceptsOpens with credits
- Model RegistryNamed, versioned models with aliases that decide which version is live, and a clear promotion path.7 conceptsOpens with credits
- Serving, deployment and projectsTurning a logged model into a REST endpoint, a container or a batch job, and packaging training code with MLflow Projects.7 conceptsOpens with credits
- EvaluationScoring classical models and GenAI apps in a repeatable way, and using the results to decide what gets promoted.6 conceptsOpens with credits
- GenAI tracing and promptsObserving LLM applications with traces, and versioning prompts in the registry alongside models.7 conceptsOpens with credits
- MLOps practiceThe habits and pipelines around MLflow that make models reproducible, reviewable and safe to change.7 conceptsOpens with credits
- 10Glossary, A to ZEvery concept in the sheet and the smaller terms it uses, in one list.83 terms
About this sheet
Experiment tracking, the tracking server, models and signatures, the Model Registry with aliases, serving, evaluation, GenAI tracing and MLOps.
Related on Sefism
Picked from the other libraries by shared topics.
Roadmaps
See allBest practices
See allChecklists
See allProject structures
See all- Machine learning project project structureFor students and analysts whose model works in a notebook and now needs to be reproducible, reviewable, served and watched. It starts from the Cookiecutter Data Science v2 layout (immutable raw data, numbered notebooks, a real Python package) and grows into versioned data with DVC, typed parameters, data validation with pandera, experiment tracking and a model registry with MLflow, a FastAPI prediction service, drift monitoring and, for a team, scheduled retraining, model cards, fairness checks and shadow deployment.
- MLOps pipeline project structureFor engineers who can train a model and now need the training to be a pipeline anyone can rerun, review and release. A uv workspace holds the pipeline package (prepare, validate, featurize, train, evaluate, register steps run by DVC), a small shared feature package, and a separate FastAPI prediction service that loads models from the MLflow registry by alias. It grows into CI that reproduces the pipeline on pull requests, scheduled retraining, approved promotion and monitoring.
Career questions
See all- My machine learning projects never leave a Jupyter notebook. How do I learn to deploy a model?Move the notebook code into a small Python package, save the whole preprocessing and model pipeline, put it behind a FastAPI endpoint in a Docker container and deploy it. Then add what makes it production: tracked runs, a registry, a test in CI, prediction logging and a drift check. Start with batch predictions if you can.
- What is the difference between a data analyst, a data scientist and a machine learning engineer?Analysts answer business questions with SQL, spreadsheets, dashboards and reports. Data scientists add statistics, experiments and predictive models. ML engineers build and run models inside production software. Titles vary by company, so read the work in the job advert, and pick by the kind of problem you enjoy, not the title that sounds most senior.
- How do I become an MLOps engineer?MLOps engineers keep models working in production: packaging, versioning, pipelines, serving, CI/CD and monitoring. Come in from either software or DevOps with ML basics, or from ML with engineering habits. Learn the lifecycle in order, then prove it with one model you deploy, monitor and roll back yourself.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
- 1:1 Mentorship
- Fresh Graduate Mentorship
- Career Guidance
Brand deals, promos and partnerships: tauseeffayyaz@gmail.com