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

Fixed: UserWarning "Hint: Inferred schema contains integer column(s)" When You Log a Dataset in MLflow

· 9 min read
Jagdish Kumawat
Founder @ Dewiride

Logging a small table of whole numbers as an MLflow dataset printed a long UserWarning: Hint: Inferred schema contains integer column(s). Integer columns in Python cannot represent missing values. The hint is about models, whose input types MLflow checks at prediction time, and nothing checks a dataset's schema. Whether you silence it or switch to decimal columns depends on one question: can those columns ever be empty?

Fixed: UserWarning "The specified dataset source can be interpreted in multiple ways: LocalArtifactDatasetSource, LocalArtifactDatasetSource" in MLflow

· 10 min read
Jagdish Kumawat
Founder @ Dewiride

Logging a pandas DataFrame read from a CSV file, with that file as its source, made MLflow print UserWarning: The specified dataset source can be interpreted in multiple ways: LocalArtifactDatasetSource, LocalArtifactDatasetSource. It names the same source type twice because MLflow 3.18.0 registers it twice. The dataset it logs is correct, and a warnings filter for this one message keeps your output clean until MLflow fixes it.

Fixed: Pandas4Warning "For backward compatibility, 'str' dtypes are included by select_dtypes when 'object' dtype is specified" in MLflow log_table

· 9 min read
Jagdish Kumawat
Founder @ Dewiride

pytest passed all 31 tests of a project that logs tables to MLflow, then printed a warnings summary: Pandas4Warning: For backward compatibility, 'str' dtypes are included by select_dtypes when 'object' dtype is specified. It comes from one line inside mlflow.log_table() meeting pandas 3's new text type, and it changes nothing about the tables you log. One filterwarnings line hides exactly this warning until an MLflow release stops raising it.

MLflow Tutorial for Machine Learning in Python — Part 2: Log Metrics Over Time and System Metrics

· 38 min read
Jagdish Kumawat
Founder @ Dewiride

Part 1 logged each score once, after training was over. That hides the question every model raises: was more training still helping? In this part the forest grows in stages, MLflow records its score after every stage, and the curves show where extra trees stop paying off. MLflow also records how hard the computer worked while it trained.

How to Change the X-Axis of a Metric Chart in the MLflow UI

· 11 min read
Jagdish Kumawat
Founder @ Dewiride

When a run logs a metric at several steps, the MLflow UI draws it as a line against Step. That's one of four choices: the same chart can run along the clock, along the seconds since the run's first value, or along another metric. This guide tries all four on one chart, then changes every chart at once, with screenshots from MLflow 3.18.0.

How to Change the System Metrics Sampling Interval in MLflow

· 8 min read
Jagdish Kumawat
Founder @ Dewiride

By default, MLflow samples the computer's CPU, memory, disk and network every 10 seconds. That suits a training job that runs for an hour, but a run that lasts a minute gets about five points, and a run shorter than 10 seconds gets none. Two functions change how often MLflow samples and how many samples it averages into each point. This guide tries three settings on the same run, with real output from MLflow 3.18.0.

How to Turn On System Metrics Logging in MLflow

· 8 min read
Jagdish Kumawat
Founder @ Dewiride

MLflow can record what the computer is doing while a run works: CPU use, memory, disk and network. On a long training job, that shows whether the model is starved for memory or using every core. It's off by default and needs one extra package. This guide turns it on three ways and reads the results, with real output from MLflow 3.18.0.

How to Get the History of a Metric in MLflow

· 6 min read
Jagdish Kumawat
Founder @ Dewiride

When a run logs a metric many times, such as a loss after every round of training, MLflow keeps every value. The run's summary shows only the latest one, though. MlflowClient.get_metric_history returns them all, each with its step and the moment it was logged. This guide reads a short curve back and finds its best step, with real output from MLflow 3.18.0.

Fixed: "No charts in this section" on the MLflow System Metrics Tab

· 12 min read
Jagdish Kumawat
Founder @ Dewiride

The System metrics tab of a short MLflow run said System metrics (0) and "No charts in this section", although system metrics were turned on and longer runs had their charts. MLflow logs a sample only after waiting one sampling interval and finding the run still going, so a run that ends sooner records nothing. Sample more often than your shortest run lasts.

MLflow Tutorial for Machine Learning in Python — Part 1: Install MLflow and Track Your First Experiment

· 42 min read
Jagdish Kumawat
Founder @ Dewiride

Every time you train a model, you change something: the number of trees, a setting, the data. A week later nobody remembers which change gave the best result. MLflow remembers it for you. In this first part you install MLflow, start your own tracking server, and log your first machine learning experiment from Python.