Results

Overview

To retrieve results call the get results route with the job identifier. Results are keyed on the user’s input item names provided upon job submittal. Each model has its own result MIME type, found in the model’s details. You can also add the user’s input item name to the route and limit the results to a single input item.

Jobs requested for multiple input items may have partial results available prior to job completion. Items get fully processed and can be seen in the job details route while the job continues to run. Call the retrieve results route to retrieve specific information for an input processing including status, startTime, endTime, updateTime, elapsedTime, and assigned engine.

Explainability

Image classification models with the explainability feature return JSON outputs with mask values for explainable results. Mask values include the prediction results and the explainability results (pixel values that motivate the prediction made by the model).

Text classification models with the explainability feature return JSON outputs with word importance values for explainable results. It includes the prediction results and explainability results (score values that motivate the prediction made by the model).

Input status

Input status is about what happens with a specific input processing. Inputs start off as FETCHING_DATA and move to PROCESSING. They can then transition to FAILED or SUCCESSFUL.

Input status

Description

FETCHING_DATA

The input item is retrieved.

PROCESSING

A pod is assigned to the input for processing.

FAILED

The input processing failed.

SUCCESSFUL

The input was processed successfully.

The results object

{
    "jobIdentifier": "...",
    "total": 1,
    "completed": 1,
    "failed": 0,
    "finished": true,
    "submittedByKey": "...",
    "explained": true,
    "results": {
        "inputName": {}
    },
    "failures": {}
}

Parameter

Type

Description

jobIdentifier

string

The job’s identifier.

total

number

Total number of inputs processed by the job request.

completed

number

Total number of inputs fully processed by the model.

failed

number

Total number of inputs that failed to be processed by the model.

finished

boolean

If the job finished processing the outputs.

submittedByKey

string

The API key that submitted the job.

explained

boolean

Defines if the job has explainable results.

results

object

Contains an input object for every input item processed. Input item names can be defined before running the model and used to retrieve individual results.

failures

object

Contains an input object for every input that failed to be processed by the model. Input item names can be defined before running the model and used to retrieve individual results.

The input items object

{
    "inputName": {
        "status": "...",
        "engine": "...",
        "startTime": "...",
        "updateTime": "...",
        "endTime": "...",
        "elapsedTime": 123,
        "outputName": {}
    }
}

Parameter

Type

Description

status

string

The input item’s status. Values can be FETCHING_DATA, PROCESSING, FAILED, and SUCCESSFUL.

engine

string

Contains the details of the processing engine that ran this input item.

startTime

string

Time the inference stated for the input item in ISO8601 (YYYY-MM-DDThh:mm:ss.sTZD) format.

updateTime

string

Time the input item status was last updated in ISO8601 (YYYY-MM-DDThh:mm:ss.sTZD) format.

endTime

string

Time the inference is completed for the input item in ISO8601 (YYYY-MM-DDThh:mm:ss.sTZD) format.

elapsedTime

number

Time between an input starts to run and it finishes in milliseconds.

outputName

object

Contains the model’s inference output for the input item. Each version has its own output name.

The explainability object

{
  "modelType": "imageClassification",
  "result": {
    "classPredictions": []
  },
  "explanation": {
    "maskRLE": [],
    "dimensions": {}
  }
}
{
  "modelType": "textClassification",
  "result": {
    "classPredictions": []
  },
  "explanation": {
    "wordImportances": {},
    "explainableText": {}
  }
}

Image classification models explainability object

Parameter

Type

Description

modelType

string

Defines the explanation format. Possible options: imageClassification, imageSegmentation, objectDetection.

result

object

Contains the results in a classPredictions array.

explanation

object

Contains a maskRLE array with the explanation and a dimensions object with the height and width pixels. The maskRLE follows a column-major order (Fortran order).

Text classification models explainability object

Parameter

Type

Description

modelType

string

Defines the explanation format. Possible Options: textClassification.

result

object

Contains the results in a classPredictions list that consists of a prediction and score for each class.

explanation

object

Contains:

Optional explainableText key/value pair whose value is a string containing the preprocessed text which was fed to the model.

wordImportances key/value pair whose value is an object in which keys are class names and values are lists containing explanation entry objects. Each of these explanation entry objects contains the word, score, and optionally the index of the occurrence of the word in the text split on whitespace. If explainableText is provided, then index values must refer to the explainableText. If explainableText is not provided, then index values must refer to the original input text. If a score is negative, it means that the word contributed negatively to that class prediction.