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 unit settings and pool ID with training tasks

Quality control lets you get more accurate responses and restrict access to tasks for cheating users. Quality control consists of rules. All rules work independently.

Parameters Description

ParametersTypeDescription
training_requirementOptional[TrainingRequirement]

Parameters of the training pool that is linked to the pool with the main tasks.

captcha_frequencyOptional[CaptchaFrequency]

Deprecated. Frequency of captcha display (By default, captcha is not shown): LOW - show every 20 tasks. MEDIUM, HIGH - show every 10 tasks.

configsOptional[List[QualityControlConfig]]

List of quality control units. See QualityControl.QualityControlConfig

checkpoints_configOptional[CheckpointsConfig]

Random check majority opinion. Detailed description in QualityControl.CheckpointsConfig.

Examples:

How to set up quality control on new pool.

new_pool = toloka.pool.Pool(....)
new_pool.quality_control.add_action(
collector=toloka.collectors.AssignmentSubmitTime(history_size=5, fast_submit_threshold_seconds=20),
conditions=[toloka.conditions.FastSubmittedCount > 1],
action=toloka.actions.RestrictionV2(
scope=toloka.user_restriction.UserRestriction.ALL_PROJECTS,
duration=10,
duration_unit='DAYS',
private_comment='Fast responses', # Only you will see this comment
)
)

Methods Summary

MethodDescription
add_actionAdds new QualityControlConfig to QualityControl object. Usually in pool.
Toloka-Kit
OverviewGetting OAuth tokenQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming