Module 5 · step 4 of 6 · Deploying and testing
Batch predictions
Score a whole file with your deployed model and download the result.
App7 min
In this step you will score a whole file with your deployed model and download the result. It matters because most business uses of a model are lists, not single calls: customers to contact this week, orders to review, parts to inspect.
The idea
Batch prediction takes a file with one row per record, lets the deployed model add its predictions as new columns and gives you the same file back in the same format. It runs as a background job, so you can leave the page and return to it under Recent jobs. It is the right tool when nobody is waiting for an answer; use Test a prediction or the REST endpoint when an application needs one right now.
The model reads only the columns it was trained on. Anything else in your file, such as an ID or a name, is an extra column. By default Ignore extra columns is on: extras are kept in the result file but never sent to the model, and the job lists them afterwards.
Step by step
- Select Deployments, open your endpoint and select the Test tab. Below Test a prediction is Batch predict. The deployment must be active; otherwise the panel says "This deployment is not active, so it cannot run predictions."
- Read "Your file needs these N columns". Select Template CSV to download a header-only file with exactly those columns. The target column is not needed.
- Fill in a few rows. Add one column the model does not use, for example
customer_id. - Drop the file on the area, or select browse. CSV, Excel (.xlsx) and Parquet are accepted; Remove file lets you pick another.
- Leave Ignore extra columns ticked and select Run batch prediction. The progress shows Upload file, Predict and Download, and the job moves from Waiting to start to Predicting to Done.
- When it says Predictions ready and how many rows were predicted, read the note listing the ignored columns, then select Download result.
- Open the file. It contains your original columns, including the ignored one, plus a
predictioncolumn and oneprobability_<class>column per class. - Untick Ignore extra columns, select Predict another file and run the same file. It is rejected with "The file's columns do not match the model" and a list of Extra columns.
You need an editor role in the workspace to start a batch job. Any member can see Recent jobs and download results.
What you should see
A job with the status Done, a downloaded ..._predictions file with prediction and probability columns, and the job listed under Recent jobs with its row count.
Common mistakes
- Missing columns. The failure lists Missing columns you must add; compare with the Template CSV.
- Extra columns with the option off. The message offers Run again ignoring extra columns or Upload another file.
- Wrong kind of value, such as text where a number is expected. The panel says "The model could not predict on this file"; open Technical details for the exact message.
- An unsupported or empty file. The app says "This file type is not supported" or "The file is empty." before the job starts.
As a data scientist
Score a batch the same way you would train: with the same column definitions and the same period logic. Keep the ID column in the file, since it is what you join the predictions back with. Batch files are not logged for drift, so keep sending a sample of real traffic through the endpoint if you want the monitor to see what production looks like.
Checkpoint
You should see a batch job with the status Done, a downloaded file with a prediction column and one probability column per class, and the job listed under Recent jobs.