toloka.client.collectors.AcceptanceRate
| Source code
AcceptanceRate( self, *, uuid: Optional[UUID] = None, history_size: Optional[int] = None)
Counts accepted and rejected Toloker's assignments.
If non-automatic acceptance is set in the pool, you may use this collector to:
The collector can be used with conditions:
The collector can be used with actions:
Parameters | Type | Description |
---|---|---|
uuid | Optional[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. |
history_size | Optional[int] | The maximum number of recent assignments used to calculate the statistics. If |
Examples:
The example shows how to block a Toloker if they make too many mistakes. If more than 35% of responses are rejected, then the Toloker is restricted to access the project. The rule is applied after collecting 3 or more responses.
new_pool = toloka.client.pool.Pool()new_pool.quality_control.add_action( collector=toloka.client.collectors.AcceptanceRate(), conditions=[ toloka.client.conditions.TotalAssignmentsCount > 2, toloka.client.conditions.RejectedAssignmentsRate > 35, ], action=toloka.client.actions.RestrictionV2( scope=toloka.client.user_restriction.UserRestriction.PROJECT, duration=15, duration_unit='DAYS', private_comment='The Toloker often makes mistakes', ))
Last updated: August 28, 2023