find_aggregated_solutions

toloka.client.TolokaClient.find_aggregated_solutions | Source code

Finds aggregated responses that match certain criteria.

Pass to the find_aggregated_solutions the ID of the operation started by the aggregate_solutions_by_pool method.

The number of returned aggregated responses is limited. To find remaining responses call find_aggregated_solutions with updated search criteria.

To iterate over all matching aggregated responses you may use the get_aggregated_solutions method.

Parameters Description

ParametersTypeDescription
operation_idstr

The ID of the aggregation operation.

task_id_ltOptional[str]

Responses for tasks with IDs less than the specified value.

task_id_lteOptional[str]

Responses for tasks with IDs less than or equal to the specified value.

task_id_gtOptional[str]

Responses for tasks with IDs greater than the specified value.

task_id_gteOptional[str]

Responses for tasks with IDs greater than or equal to the specified value.

sortUnion[List[str], AggregatedSolutionSortItems, None]

Sorting options. Default: None.

limitOptional[int]

Returned aggregated responses limit. The default limit is 50. The maximum allowed limit is 100,000.

Examples:

The example shows how to get all aggregated responses using the find_aggregated_solutions method.

# run toloka_client.aggregate_solutions_by_pool and wait for the operation to complete.
current_result = toloka_client.find_aggregated_solutions(aggregation_operation.id)
aggregation_results = current_result.items
# If we have more results, let's get them
while current_result.has_more:
current_result = toloka_client.find_aggregated_solutions(
aggregation_operation.id,
task_id_gt=current_result.items[-1].task_id,
)
aggregation_results = aggregation_results + current_result.items
print(len(aggregation_results))
Toloka-Kit
OverviewGetting OAuth tokenQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming