Batch predictions

Score a whole CSV, Excel or Parquet file against a deployment and download the results.

A batch prediction scores a whole file in one step. You upload a file with one row per record, the deployed model adds its predictions as new columns, and you download the same file back in the same format. Use it for weekly scoring runs or one-off lists; use a single prediction when an application needs an answer right away.

Score a file

Open the deployment

Select Deployments, open an endpoint and select the Test tab. Below the card Test a prediction you find Batch predict. The deployment must be active. If it is not, the panel tells you to reactivate it first.

Check what the file needs

The panel lists the columns the model was trained on: "Your file needs these N columns". Select Show all to see the full list, or Template CSV to download a header-only file you can fill in. The target column is not needed.

Add your file

Drop a file on the area or select browse. Accepted types are CSV, Excel (.xlsx) and Parquet. You can select Remove file to choose another.

Choose how to treat extra columns

Ignore extra columns is on by default. If your file has columns the model does not use, for example an ID or a name, they are kept in the result file but not sent to the model, and the job lists them as ignored columns. Turn it off to reject files that have extra columns: any extra column then makes the job fail.

Run it

Select Run batch prediction.

The result file has all your original columns, plus a prediction column and, for classification models that can score classes, one probability_<class> column per class. If your file already has a column with one of these names, the new column gets the suffix _predicted.

Job status and download

The progress bar shows three steps: Upload file, Predict and Download. A job has one of these states:

StatusMeaning
Waiting to startThe file is stored and queued.
PredictingThe model is scoring the rows.
DoneThe result is ready. The panel shows "Predictions ready" and how many rows were predicted.
FailedNothing was produced. The panel shows the reason.

When a job is done, select Download result. The file is named after your upload, with _predictions added: customers.csv becomes customers_predictions.csv. Select Predict another file to start again.

Jobs run in the background. You can leave the page and come back: every job is listed under Recent jobs with its date and row count, and a finished job has a download button there.

When a job fails

The panel explains the cause in plain words:

  • The file's columns do not match the model. The message lists Missing columns, which you must add, and Extra columns, which you can remove or allow with Run again ignoring extra columns. Select Upload another file to start over.
  • The file could not be read. Check that it opens in a spreadsheet tool and that it really is a CSV, Excel or Parquet file.
  • The file has column headers but no rows.
  • The model could not predict on this file. Often a column holds the wrong kind of value, for example text where a number is expected. Open Technical details for the exact message.
  • The model behind this deployment is no longer available.

Column checks may be skipped

Column names are checked against what the model recorded during training. If the model does not record its input columns, mlflow falls back to the training data, and if that is not available either, it skips the check and adds a warning to the job. In that case a wrong column shows up as a failed prediction instead.

Limits

These limits are defaults. On a self-hosted server an administrator can change them.

LimitDefault
File size64 MB. A larger upload is refused with the message "The file is too large".
Rows1,000,000 per file. Split larger files.
Columns5,000 per file.
File types.csv, .xlsx and .parquet. Anything else is refused.

The upload must not be empty. Compressed formats, such as Excel and Parquet, are also checked for how large they become once unpacked, so a small file cannot use up the server's memory.

You need an editor role or higher in the workspace to start a batch job. Any member can see the job list and download results.

From the API

POST/api/v1/deployments/{slug}/batch

Send the file as a multipart form field named file. Extra columns are ignored by default, as the online endpoint does. Add the query parameter ignore_extra_columns=false to make any extra column fail the job instead. The server answers 202 with a job, then you poll it and download the result. An API key with the predict scope is enough for all four steps.

bash
BASE=https://app.mlflow.es/api/v1

# 1. Queue the job
curl -s -X POST "$BASE/deployments/churn-prod/batch" \
  -H "X-API-Key: $MLFLOW_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -F file=@new_customers.csv

# 2. Poll until status is succeeded or failed
curl -s "$BASE/batch-jobs/$JOB_ID" -H "X-API-Key: $MLFLOW_API_KEY"

# 3. Download the result
curl -s "$BASE/batch-jobs/$JOB_ID/download" \
  -H "X-API-Key: $MLFLOW_API_KEY" -o new_customers_predictions.csv

The job object has status (queued, running, succeeded or failed), n_rows, error, error_details (the missing and extra columns of a schema mismatch), ignored_columns (the extra columns that were left out of the model's input), warnings and download_url. To list the latest jobs of a deployment, call GET /api/v1/deployments/{slug}/batch-jobs.

Errors when queueing a job: 409 if the deployment is not active, 413 if the file is over the size limit, 415 for an unsupported file type and 400 for an empty file.

Retrying safely

Send an Idempotency-Key header with a unique value, such as a UUID. If your client times out and sends the same request again with the same key, deployment, file name, file contents and options, mlflow returns the job it already queued (with the header Idempotent-Replayed: true) instead of scoring the file twice. A key is remembered for 24 hours. Reusing a key for a different file gives a 422. See Pagination and idempotency for the full rules.

Next steps

Learn the theory

Lessons on learning.mlflow.es that explain the ideas behind this page.

Updated 2026-11-22