MPM Endpoints
Note that access to the Comet REST endpoints require the {'Authorization': ${COMET_API_KEY}}
header. To get your API key, see Comet Python API Setup.
Send MPM Event¶
Send an MPM event containing the input or output features for a given prediction. The fields features
and prediction
are optional, you can send the input features and output features as part of a single message or multiple messages
Example Request
{
"workspaceName": "someWorkspaceName",
"modelName": "someModelName",
"modelVersion": "2.1.0",
"predictionId": "b99f9195-435d-427f-afed-03731efa2774",
"timestamp": 1662544656000,
"features": {
"feature_1": "any_string",
"feature_2": 10
},
"prediction": {
"value": "true",
"probability": 0.87
}
}
Example Response
{
"code": 200
}
Send MPM Event in batch¶
Send a batch of MPM events
Example Request
[
{
"workspaceName": "someWorkspaceName",
"modelName": "someModelName",
"modelVersion": "2.1.0",
"predictionId": "b99f9195-435d-427f-afed-03731efa2774",
"timestamp": 1662544656000,
"features": {
"feature_1": "dog",
"feature_2": 10
},
"prediction": {
"value": "true",
"probability": 0.87
}
},
{
"workspaceName": "someWorkspaceName",
"modelName": "someModelName",
"modelVersion": "2.1.0",
"predictionId": "999ad77d-da2b-49ee-80fa-a8c880921e29",
"timestamp": 1662544657000,
"features": {
"feature_1": "cat",
"feature_2": 12
},
"prediction": {
"value": "false",
"probability": 0.92
}
}
]
Example Response
{
"code": 200
}
Send MPM Labels¶
Send an MPM event containing the ground truth value for a prediction whose input and output features are already stored in Comet
Example Request
{
"workspaceName": "someWorkspaceName",
"modelName": "someModelName",
"modelVersion": "2.1.0",
"predictionId": "b99f9195-435d-427f-afed-03731efa2774",
"value": "false"
}
Example Response
{
"code": 200
}
Get recent ingestion errors by MPM¶
Fetch the 100 most recent ingestion errors, useful when debugging MPM integrations
Example Response
{
"errors": [
{
"id": "jRRst6A93vlg9BJgk8DcpWTiK",
"timestamp": 1662549929992,
"eventTimestamp": null,
"workspaceId": "299bbd0e-e676-4447-a0a5-cdc115a7d2ed",
"modelId": "zzK6iyaFPPVqmdHADj6AWieTc",
"modelVersion": "7.9.0",
"predictionId": "1662549780-52",
"error": "label already exists"
}
]
}
Get recent events ingested by MPM¶
Fetch the 100 most recent events ingested by MPM, useful when debugging MPM integrations
Example Response
{
"events": [
{
"workspaceName": "someWorkspaceName",
"modelName": "someModelName",
"modelVersion": "2.1.0",
"predictionId": "999ad77d-da2b-49ee-80fa-a8c880921e29",
"timestamp": 1662544657000,
"features": {
"feature_1": "cat",
"feature_2": 12
},
"prediction": {
"value": "false",
"probability": 0.92
}
}
]
}
Get recent labels ingested¶
Fetch the 100 most recent labels ingested by MPM, useful when debugging MPM integrations
Example Response
{
"labels": [
{
"workspaceName": "someWorkspaceName",
"modelName": "someModelName",
"modelVersion": "2.1.0",
"predictionId": "b99f9195-435d-427f-afed-03731efa2774",
"value": "false"
}
]
}