Skip to main content
Version: 1.39

Prediction logs

This section explains how to retrieve predictions logs of a Deployment. Retrieving prediction logs allows you to evaluate or submit actuals over them. It's also possible to use the retrieval functionality to export predictions.

Request logs

To see which requests have been made, you can retrieve the request logs. One request can contain multiple predictions.

request_logs = client.get_request_logs(deployment_id)

Prediction logs

There are various way to query the prediction logs, all shown in the Get Prediction Log options

from deeploy import GetPredictionLogsOptions

get_options: GetPredictionLogsOptions = {
"start": 1706223600000,
"offset": 0,
"limit": 10,
"sort": "createdAt:desc",
"custom_id": "like:example",
"prediction_class": "in:firstClass,secondClass",
"actual": "eq:available",
"evaluation": "in:agreed,disagreed",
"status": "eq:success",
}

prediction_logs = client.get_prediction_logs(deployment_id, get_options)

To retrieve a single prediction log, you can use the id parameter.

from deeploy import GetPredictionLogsOptions

get_options: GetPredictionLogsOptions = {
"id": "eq:b6d8c781-2526-4e03-9b43-4c1a62d064db",
}

prediction_logs = client.get_prediction_logs(deployment_id, get_options)