SetSkillFromOutputField

toloka.client.actions.SetSkillFromOutputField | Source code

SetSkillFromOutputField(
self,
*,
skill_id: Optional[str] = None,
from_field: Union[RuleConditionKey, str, None] = None
)

Sets Toloker's skill value to the percentage of correct or incorrect answers.

You can use this action with MajorityVote and GoldenSet collectors.

Parameters description

ParametersTypeDescription
skill_idOptional[str]

The ID of the skill to update.

from_fieldUnion[RuleConditionKey, str, None]

The value to assign to the skill:

  • correct_answers_rate — Percentage of correct answers.
  • incorrect_answers_rate — Percentage of incorrect answers.

Examples:

In the following example, a MajorityVote collector is used to update a skill value.

new_pool = toloka.client.pool.Pool()
new_pool.quality_control.add_action(
collector=toloka.client.collectors.MajorityVote(answer_threshold=2, history_size=10),
conditions=[
toloka.client.conditions.TotalAnswersCount > 2,
],
action=toloka.client.actions.SetSkillFromOutputField(
skill_id=some_skill_id,
from_field='correct_answers_rate',
),
)

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