QualityControl

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 description

ParametersTypeDescription
configsOptional[List[QualityControlConfig]]

A list of quality control rules configurations.

checkpoints_configOptional[CheckpointsConfig]

A selective majority vote check configuration.

training_requirementOptional[TrainingRequirement]

Parameters for linking a training pool to a general task pool.

captcha_frequencyOptional[CaptchaFrequency]

Deprecated. A frequency of showing captchas.

  • LOW — Show one for every 20 tasks.
  • MEDIUM, HIGH — Show one for every 10 tasks.

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',
)
)

Methods summary

MethodDescription
add_actionAdds a quality control rule configuration.

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