Skip to main content

122 posts tagged with "MLflow"

MLflow, the Open Source Platform for Tracking, Evaluating and Serving Machine Learning Models

View All Tags

How to Log a Folder of Files to MLflow with log_artifacts

· 5 min read
Jagdish Kumawat
Founder @ Dewiride

When a step of your code writes several files, such as a set of reports or charts, logging them one by one gets tedious. mlflow.log_artifacts() uploads a whole folder to the run in one call, subfolders included. One detail decides where the files end up: artifact_path. This guide logs a folder of two reports, with real output from MLflow 3.18.0.

How to Log a File to MLflow with log_artifact

· 5 min read
Jagdish Kumawat
Founder @ Dewiride

Anything your code writes to disk can travel with the run that produced it: a CSV of predictions, a saved chart, a report, the data file itself. mlflow.log_artifact() uploads one file to the run, where it can be previewed and downloaded from the MLflow UI. This guide logs a CSV file twice, once at the top level and once in a folder, with real output from MLflow 3.18.0.

How to Log Text to a File in MLflow with log_text

· 5 min read
Jagdish Kumawat
Founder @ Dewiride

Notes about a run, a text report, a summary someone else will read: when the content is already a string, mlflow.log_text() saves it with the run as a file in one call, without creating anything on your disk. This guide logs a Markdown note and a plain text file and looks at both in the MLflow UI, with real output from MLflow 3.18.0.

How to Log a Dictionary to MLflow as a JSON or YAML File

· 6 min read
Jagdish Kumawat
Founder @ Dewiride

A run's settings, a model's full configuration or a summary of results often already sit in a Python dictionary. mlflow.log_dict() saves one with the run as a JSON or YAML file in a single line, without writing anything to disk yourself. This guide logs the same dictionary in both formats and compares the files, with real output from MLflow 3.18.0.

How to Load a Logged Table from MLflow with load_table

· 5 min read
Jagdish Kumawat
Founder @ Dewiride

A table logged with mlflow.log_table() can be read straight back into a pandas DataFrame with mlflow.load_table(). Its best trick is reading the same table from many runs at once, stacked into one DataFrame with a column that says which run each row came from. This guide loads a predictions table from two runs, with real output from MLflow 3.18.0.

How to Log a Table in MLflow with log_table

· 6 min read
Jagdish Kumawat
Founder @ Dewiride

Some results of a run are tables: predictions next to the real values, scores per group, the importance of each feature. mlflow.log_table() saves a pandas DataFrame or a dictionary with the run as a table that the MLflow UI shows as rows and columns and can compare across runs. This guide logs a small predictions table from two models, with real output from MLflow 3.18.0.

How to Make an MLflow Dataset Digest Cover Every Row

· 8 min read
Jagdish Kumawat
Founder @ Dewiride

An MLflow dataset's digest is meant to tell you when data changes, but for a pandas DataFrame it only looks at part of it: the first 10,000 rows, and only the columns that hold text or numbers. Change a value further down, or a date anywhere, and the digest stays the same. This guide shows both gaps happening, finds the reason in MLflow's code, and passes a digest of every row and column instead, with real output from MLflow 3.18.0.

How to Check Whether Two MLflow Runs Used the Same Data

· 7 min read
Jagdish Kumawat
Founder @ Dewiride

When two runs give different results, the first question is whether they learned from the same data. If both logged their data with mlflow.log_input(), MLflow already knows: each dataset has a digest, a short fingerprint of its contents, and equal digests mean equal data. This guide compares three runs in the UI and in Python, with real screens and output from MLflow 3.18.0.

How to See Which Datasets an MLflow Run Used

· 8 min read
Jagdish Kumawat
Founder @ Dewiride

When a run logs its data with mlflow.log_input(), MLflow keeps each dataset's name, digest, source, schema and row count with the run. You can find them in the MLflow UI, from the command line and from Python. This guide looks at one run that used a training set and a test set, in all four places, with real screens and output from MLflow 3.18.0.

How to Log a Dataset in MLflow

· 8 min read
Jagdish Kumawat
Founder @ Dewiride

A model is only as good as the data it learned from, so a run should record which data that was. MLflow does it in two calls: mlflow.data.from_pandas() describes a pandas DataFrame as a dataset, and mlflow.log_input() attaches that description to the run. This guide logs a small CSV file of houses, with real output from MLflow 3.18.0.