Skip to main content
Version: v0.11.x

Batch scoring

This example demonstrates how to use the eScorer Python client for batch scoring. You can download the complete example here.

Batch scoring with the Python client​

After authenticating the client, you can use the batch_scorer method to perform batch scoring. The batch_scorer method takes the model name and the properties file path as arguments. The properties file contains the configuration for the batch scoring job. The batch_job object is returned, which can be used to monitor the progress of the batch scoring job.

Note

For information on how to autogenerate and populate a properties file to configure batch scoring, see Batch scoring configuration and usage.

batch_job = await client.batch_scorer(
model_name='<model_name>',
properties_filepath='/path/to/file.properties',
verbose=True,
)

Get job ID​

batch_job.id
09e5042c-096a-4ee7-9bd6-182ef7457298

Check if the job is complete​

await batch_job.is_complete()
True

Get the logs​

await batch_job.get_logs()
****** AWS *******
Thread-3 BAD DATA Too Many Features ROW: = 31487,3500, 36 months,7.74,109.27,9,31200,"Not,Verified",MN,5.73,,1092,9.9,12 Len:15 Features:13 Offset: 1
Thread-3 Model has 13 features but after parsing feature count is 15 check field seperator or maybe the data contains a default seperator.
Total selected rows 39029 Total Read time (ms) 16056
Thread-1 Rows Read 19644 Scored 19644 Error 0 Queue Empty true
Thread-3 Rows Read 19385 Scored 19384 Error 1 Queue Empty true
Upload of file escorer/predictions-2024-05-28-07-51-58.csv to S3 completed

Feedback