toloka.client.quality_control.QualityControl
| Source code
QualityControl( self, *, training_requirement: Optional[TrainingRequirement] = None, captcha_frequency: Union[CaptchaFrequency, str, None] = None, configs: Optional[List[QualityControlConfig]] = ..., checkpoints_config: Optional[CheckpointsConfig] = None)
Quality control settings.
Quality control lets you get more accurate responses, restrict access to tasks for Tolokers who give responses of low quality, and filter out robots.
Parameters | Type | Description |
---|---|---|
configs | Optional[List[QualityControlConfig]] | A list of quality control rules configurations. |
checkpoints_config | Optional[CheckpointsConfig] | A selective majority vote check configuration. |
training_requirement | Optional[TrainingRequirement] | Parameters for linking a training pool to a general task pool. |
captcha_frequency | Optional[CaptchaFrequency] | Deprecated. A frequency of showing captchas.
By default, captchas aren't displayed. |
Examples:
A quality control rule that restricts access if a Toloker responds too fast.
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 > 1], action=toloka.client.actions.RestrictionV2( scope=toloka.client.user_restriction.UserRestriction.ALL_PROJECTS, duration=10, duration_unit='DAYS', private_comment='Fast responses', ))
Method | Description |
---|---|
add_action | Adds a quality control rule configuration. |
Last updated: August 28, 2023