aggregate_solutions_by_task

toloka.async_client.client.AsyncTolokaClient.aggregate_solutions_by_task | Source code

Aggregates responses to a single task on the Toloka server.

Tip

Try crowd-kit library. It has many aggregation methods and executes on your computer.

Parameters Description

ParametersTypeDescription
task_idOptional[str]

The ID of the task.

pool_idOptional[str]

The ID of the pool containing the task.

answer_weight_skill_idOptional[str]

The ID of the skill that determines the weight of the Toloker's responses.

fieldsOptional[List[WeightedDynamicOverlapTaskAggregatedSolutionRequest.Field]]

Output data fields to aggregate. For the best results, each of these fields should have limited number of response options. If the DAWID_SKENE aggregation type is selected, you can only specify one value.

Examples:

The example shows how to aggregate responses to a single task.

aggregated_response = toloka_client.aggregate_solutions_by_task(
pool_id=some_existing_pool_id,
task_id=some_existing_task_id,
answer_weight_skill_id=some_skill_id,
fields=[toloka.client.aggregation.PoolAggregatedSolutionRequest.Field(name='result')]
)
print(aggregated_response.output_values['result'])
Toloka-Kit
OverviewGetting OAuth tokenQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming