aggregate_solutions_by_task

toloka.client.TolokaClient.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='36502086',
task_id='000012bb84--62d80429f20bf20e50f36a27',
answer_weight_skill_id='11294',
fields=[toloka.client.aggregation.PoolAggregatedSolutionRequest.Field(name='result')]
)
print(aggregated_response.output_values['result'])

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