AssignmentSubmitTime

toloka.client.collectors.AssignmentSubmitTime | Source code

AssignmentSubmitTime(
self,
*,
uuid: Optional[UUID] = None,
fast_submit_threshold_seconds: Optional[int] = None,
history_size: Optional[int] = None
)

Counts fast responses.

Collector use cases.

  • To find Tolokers who respond suspiciously quickly.
  • To improve protection against robots.

The collector can be used with conditions:

The collector can be used with actions:

Parameters description

ParametersTypeDescription
uuidOptional[UUID]

The ID of a collector. Note that when you clone a pool, both pools start using the same collector, because it is not cloned. Usually, it is not an intended behavior. For example, in this case one collector gathers history size from both pools.

fast_submit_threshold_secondsOptional[int]

Fast response threshold in seconds. Any response submitted in less time than threshold is considered a fast response.

history_sizeOptional[int]

The maximum number of recent assignments used to calculate the statistics. If history_size is omitted, all Toloker's assignments in the pool are counted.

Examples:

The example shows how to reject all assignments if a Toloker sent at least 4 responses during 20 seconds after getting every task suite.

new_pool = toloka.client.pool.Pool()
new_pool.quality_control.add_action(
collector=toloka.client.collectors.AssignmentSubmitTime(history_size=5, fast_submit_threshold_seconds=20),
conditions=[toloka.client.conditions.FastSubmittedCount > 3],
action=toloka.client.actions.RejectAllAssignments(public_comment='Too fast responses.')
)

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