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 | Type | Description |
---|---|---|
skill_id | Optional[str] | The ID of the skill to update. |
from_field | Union[RuleConditionKey, str, None] | The value to assign to the skill:
|
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