TaskBatchCreateResult

toloka.client.batch_create_results.TaskBatchCreateResult

TaskBatchCreateResult(
self,
*,
items: Optional[Dict[str, Task]] = None,
validation_errors: Optional[Dict[str, Dict[str, FieldValidationError]]] = None
)

The result of a task creation.

TaskBatchCreateResult is returned by the create_tasks method.

Parameters description

ParametersTypeDescription
itemsOptional[Dict[str, Task]]

A dictionary with created tasks. The indexes of a create_tasks input list are used as keys in the dictionary.

validation_errorsOptional[Dict[str, Dict[str, FieldValidationError]]]

A dictionary with validation errors in input tasks. It is filled if the request parameter skip_invalid_items is True.

Examples:

tasks = [ toloka.client.task.Task(input_values = {'image': 'https://example.com/image0.png'}, pool_id='1240045') ]
result = toloka_client.create_tasks(tasks, allow_defaults=True, skip_invalid_items=True)
print(result.items['0'].created)

Last updated: August 28, 2023

Toloka-Kit
OverviewGetting API keyQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming