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 Search MLflow Runs in Python with search_runs

· 6 min read
Jagdish Kumawat
Founder @ Dewiride

mlflow.search_runs() is the Python way to look through an experiment's runs: one call returns them as a pandas DataFrame, one row per run, with a column for every metric, parameter and tag. You can filter, sort and limit the result on the server. This guide searches three small runs, reads the columns MLflow returns, and narrows them to the best runs, with real output from MLflow 3.18.0.

How to Write a Search Filter for MLflow Runs

· 7 min read
Jagdish Kumawat
Founder @ Dewiride

MLflow finds runs with a filter string, a short condition such as metrics.loss < 0.35. The same string works in the UI's search box and in Python's mlflow.search_runs(). It looks like the WHERE part of SQL, with a few rules of its own: which comparisons each kind of value allows, what needs quotes, and no OR. This guide gives the general form, runs five filters on three small runs, and lists the exact errors MLflow 3.18.0 gives when a rule is broken.

How to Sort Runs in the MLflow UI

· 5 min read
Jagdish Kumawat
Founder @ Dewiride

The MLflow runs table lists the newest run first. To put the best run on top instead, sort the table by the metric that measures it: lowest loss first, or highest accuracy first. This guide sorts four runs by a metric and by a parameter, where text ordering produces a surprise, and by clicking a column header, with real screens from MLflow 3.18.0.

How to Search Runs in the MLflow UI

· 7 min read
Jagdish Kumawat
Founder @ Dewiride

Once an experiment holds more than a handful of runs, scrolling stops working, and the search box above the MLflow runs table takes over. You type a condition such as metrics.accuracy > 0.8, and the table keeps only the runs that match. This guide searches three small runs by a metric and by a parameter, reads the box's built-in help, and shows what a rejected search looks like, with real screens from MLflow 3.18.0.

Fixed: MLflow Search Box Adds Backticks and Doesn't Search When You Press Enter

· 6 min read
Jagdish Kumawat
Founder @ Dewiride

I typed metrics.val_rmse < 0.54 into the search box of the MLflow UI's runs table and pressed Enter. The search didn't run: the box changed my text to metrics.`val_rmse` < 0.54, with backticks around the metric's name, and the table still listed every run. That first Enter picks the suggestion MLflow highlights while you type. Press Enter a second time to search, or press Esc before Enter to keep your text exactly as typed.

MLflow Tutorial for Machine Learning in Python — Part 3: Log Artifacts and Datasets

· 29 min read
Jagdish Kumawat
Founder @ Dewiride

Part 2's runs record numbers: scores at every step and the computer's load. Two questions those numbers can't answer: which data did this run learn from, and what did it produce besides scores? In this part every run records its training, validation and test data as MLflow datasets, and saves three files with itself: which features the forest relies on, every setting it used, and every prediction it got wrong.

How to Read a JSON or Text Artifact from MLflow in Python

· 5 min read
Jagdish Kumawat
Founder @ Dewiride

When code needs a value from a file another run logged, such as a setting from its configuration, downloading the file first is a detour. mlflow.artifacts.load_dict() returns a JSON or YAML file as a Python dictionary, and load_text() returns any text file as a string, in one call each. This guide reads a run's settings back both ways, with real output from MLflow 3.18.0.

How to Download Artifacts from an MLflow Run

· 6 min read
Jagdish Kumawat
Founder @ Dewiride

The files a run logged live on the tracking server, but sooner or later you need them on your own disk: to open a CSV in a spreadsheet, to compare reports, or to feed a file to another program. MLflow gives you three ways, a Python function, a terminal command and a button in the UI. This guide lists a run's files and downloads a folder of them, with real output from MLflow 3.18.0.

How to Compare a Logged Table Across Runs in the MLflow UI

· 5 min read
Jagdish Kumawat
Founder @ Dewiride

When several runs log the same table, such as each model's predictions for the same houses, the useful question is how the runs differ row by row. The MLflow UI answers it on the experiment's runs page, in a view called Artifact evaluation: one column per run, one row per item, with the value you choose in each cell. This guide compares two models' predictions, with real screens from MLflow 3.18.0.

How to View a Run's Artifacts in the MLflow UI

· 6 min read
Jagdish Kumawat
Founder @ Dewiride

Every file a run logs, with log_artifact, log_table, log_dict, log_text or log_figure, appears on the run's Artifacts tab in the MLflow UI. There you can browse its folders, preview most common file types, copy a file's address and download it, and on the compare page you can read the same file from several runs side by side. This guide walks through each, with real screens from MLflow 3.18.0.