client.results.get

Retrieve the results execution

client.results.get(result)

Return the current results of a Job execution, including completed, failed, total number of items processed

Parameters

Parameter

Type

Description

Example

result

str
Result
Job

Job identifier as a string or a preloaded Result object

'14856eb1-0ad8-49e7-9da3-887acb80fea5'

Returns

A Result object with the job results

📘

Result structure is different for each job and model

In each job, you define the input keys (i.e. my-input), and in the resulting structure, you need to use the same key to query the specific result. Also, each model can define his own output keys, which allow you to search specifically for the result of the model.

{
  "job_identifier": "string",
  "account_identifier": "string",  
  "submitted_by_key": "string",
  "completed": "integer",  
  "failed": "integer",  
  "total": "integer", 
  "finished": "boolean",    
  "explained": "boolean",
  "results": {
    <<<<input-item-key>>>>: {
      "status": "string",
      "engine": "string",
      "start_time": "date-time",
      "update-time": "date-time",
      "end-time": "date-time",
      "elapsed_time": "integer",
      "voting": {
        "up": "integer",
        "down": "integer"
      },
      <<<<data-output-item-key>>>>: <<model-output-value>>
    }
  },
  "team": {
    "identifier": "string"
  },  
  "average_model_latency": "number",
  "total_model_latency": "number"
}

Examples

>>>result = client.results.get('14856eb1-0ad8-49e7-9da3-887acb80fea5')
>>>result.finished
True
>>>result.results['0001']['results.json']
ApiObject({
  "confidence": "3.2059302",
  "result": "six"
})

Result object also has handy methods to access the results

>>>result = client.results.get('14856eb1-0ad8-49e7-9da3-887acb80fea5')
>>>result.get_source_outputs('0001')['results.json']
ApiObject({
  "confidence": "3.2059302",
  "result": "six"
})
>>>result.get_first_outputs()['results.json']
ApiObject({
  "confidence": "3.2059302",
  "result": "six"
})

Did this page help you?