Update Test Criteria Configuration
evaluations.tasks.update(stralias, TaskUpdateParams**kwargs) -> Evaluation
PATCH/v5/evaluations/{evaluation_id}/tasks/{alias}
Replace the full configuration of a single test criteria, identified by its alias.
The alias must match an existing test criteria on the evaluation, and the replacement configuration is validated against the evaluation’s current items before being applied. The request is rejected if the evaluation is archived, if no test criteria matches the alias, or if any contributor annotation task for the evaluation has already been claimed or completed — at that point labelers are in-flight and mutating the task definition would corrupt their work.
Update Test Criteria Configuration
import os
from scale_gp_beta import SGPClient
client = SGPClient(
api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted
)
evaluation = client.evaluations.tasks.update(
alias="alias",
evaluation_id="evaluation_id",
configuration={
"foo": "bar"
},
)
print(evaluation.id){
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": {
"id": "id",
"type": "user",
"object": "identity"
},
"datasets": [
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": {
"id": "id",
"type": "user",
"object": "identity"
},
"current_version_num": 0,
"name": "name",
"tags": [
"string"
],
"archived_at": "2019-12-27T18:11:19.117Z",
"description": "description",
"object": "dataset"
}
],
"name": "name",
"status": "failed",
"tags": [
"string"
],
"archived_at": "2019-12-27T18:11:19.117Z",
"description": "description",
"error_count": 0,
"metadata": {
"foo": "bar"
},
"object": "evaluation",
"progress": {
"items": {
"failed": 0,
"pending": 0,
"successful": 0,
"total": 0,
"failed_items": [
{
"item_id": "item_id",
"error": "error",
"error_type": "error_type"
}
]
},
"workflows": {
"completed": 0,
"failed": 0,
"pending": 0,
"total": 0
}
},
"status_reason": "status_reason",
"tasks": [
{
"configuration": {
"messages": [
{
"foo": "bar"
}
],
"model": "model",
"audio": {
"foo": "bar"
},
"frequency_penalty": -2,
"function_call": {
"foo": "bar"
},
"functions": [
{
"foo": "bar"
}
],
"logit_bias": {
"foo": 0
},
"logprobs": true,
"max_completion_tokens": 0,
"max_tokens": 0,
"metadata": {
"foo": "string"
},
"modalities": [
"string"
],
"n": 0,
"parallel_tool_calls": true,
"prediction": {
"foo": "bar"
},
"presence_penalty": -2,
"reasoning_effort": "reasoning_effort",
"response_format": {
"foo": "bar"
},
"seed": 0,
"stop": "string",
"store": true,
"temperature": 0,
"tool_choice": "string",
"tools": [
{
"foo": "bar"
}
],
"top_k": 0,
"top_logprobs": 0,
"top_p": 0
},
"alias": "alias",
"task_type": "chat_completion"
}
]
}Returns Examples
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": {
"id": "id",
"type": "user",
"object": "identity"
},
"datasets": [
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": {
"id": "id",
"type": "user",
"object": "identity"
},
"current_version_num": 0,
"name": "name",
"tags": [
"string"
],
"archived_at": "2019-12-27T18:11:19.117Z",
"description": "description",
"object": "dataset"
}
],
"name": "name",
"status": "failed",
"tags": [
"string"
],
"archived_at": "2019-12-27T18:11:19.117Z",
"description": "description",
"error_count": 0,
"metadata": {
"foo": "bar"
},
"object": "evaluation",
"progress": {
"items": {
"failed": 0,
"pending": 0,
"successful": 0,
"total": 0,
"failed_items": [
{
"item_id": "item_id",
"error": "error",
"error_type": "error_type"
}
]
},
"workflows": {
"completed": 0,
"failed": 0,
"pending": 0,
"total": 0
}
},
"status_reason": "status_reason",
"tasks": [
{
"configuration": {
"messages": [
{
"foo": "bar"
}
],
"model": "model",
"audio": {
"foo": "bar"
},
"frequency_penalty": -2,
"function_call": {
"foo": "bar"
},
"functions": [
{
"foo": "bar"
}
],
"logit_bias": {
"foo": 0
},
"logprobs": true,
"max_completion_tokens": 0,
"max_tokens": 0,
"metadata": {
"foo": "string"
},
"modalities": [
"string"
],
"n": 0,
"parallel_tool_calls": true,
"prediction": {
"foo": "bar"
},
"presence_penalty": -2,
"reasoning_effort": "reasoning_effort",
"response_format": {
"foo": "bar"
},
"seed": 0,
"stop": "string",
"store": true,
"temperature": 0,
"tool_choice": "string",
"tools": [
{
"foo": "bar"
}
],
"top_k": 0,
"top_logprobs": 0,
"top_p": 0
},
"alias": "alias",
"task_type": "chat_completion"
}
]
}