Skip to main content
Python
import os

from openlayer import Openlayer

client = Openlayer(
    api_key=os.environ.get("OPENLAYER_API_KEY"),  # This is the default and can be omitted
)
response = client.tests.evaluate(
    test_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    end_timestamp=1700006400,
    start_timestamp=1699920000,
)
print(response.message)
{
  "message": "Evaluation task queued successfully",
  "pipelineCount": 2,
  "requestedStartTimestamp": 1699920000,
  "requestedEndTimestamp": 1700006400,
  "tasks": [
    {
      "taskResultUrl": "<string>",
      "taskResultId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "pipelineId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your workspace API key. See Find your API key for more information.

Path Parameters

testId
string<uuid>
required

The test id.

Body

application/json
startTimestamp
integer<int64>
required

Start timestamp in seconds (Unix epoch)

Example:

1699920000

endTimestamp
integer<int64>
required

End timestamp in seconds (Unix epoch)

Example:

1700006400

inferencePipelineId
string<uuid>

ID of the inference pipeline to evaluate. If not provided, all inference pipelines the test applies to will be evaluated.

Example:

"123e4567-e89b-12d3-a456-426614174000"

overwriteResults
boolean
default:false

Whether to overwrite existing test results

Example:

false

Response

Evaluation task queued successfully. Timestamps will be aligned to evaluation window boundaries during execution.

message
string
required
Example:

"Evaluation task queued successfully"

pipelineCount
integer
required

Number of inference pipelines the test was queued for evaluation on

Example:

2

requestedStartTimestamp
integer<int64>
required

The start timestamp you requested (in seconds)

Example:

1699920000

requestedEndTimestamp
integer<int64>
required

The end timestamp you requested (in seconds)

Example:

1700006400

tasks
object[]
required

Array of background task information for each pipeline evaluation