Pool

toloka.client.pool.Pool | Source code

Pool(
self,
*,
project_id: Optional[str] = None,
private_name: Optional[str] = None,
may_contain_adult_content: Optional[bool] = None,
reward_per_assignment: Optional[float] = None,
assignment_max_duration_seconds: Optional[int] = None,
defaults: Optional[Defaults] = ...,
will_expire: Optional[datetime] = None,
private_comment: Optional[str] = None,
public_description: Optional[str] = None,
public_instructions: Optional[str] = None,
auto_close_after_complete_delay_seconds: Optional[int] = None,
dynamic_pricing_config: Optional[DynamicPricingConfig] = None,
auto_accept_solutions: Optional[bool] = None,
auto_accept_period_day: Optional[int] = None,
assignments_issuing_config: Optional[AssignmentsIssuingConfig] = None,
priority: Optional[int] = None,
filter: Optional[FilterCondition] = None,
quality_control: Optional[QualityControl] = ...,
speed_quality_balance: Optional[SpeedQualityBalanceConfig] = None,
dynamic_overlap_config: Optional[DynamicOverlapConfig] = None,
mixer_config: Optional[MixerConfig] = None,
training_config: Optional[TrainingConfig] = None,
metadata: Optional[Dict[str, List[str]]] = None,
owner: Optional[Owner] = None,
id: Optional[str] = None,
status: Optional[Status] = None,
last_close_reason: Optional[CloseReason] = None,
created: Optional[datetime] = None,
last_started: Optional[datetime] = None,
last_stopped: Optional[datetime] = None,
type: Optional[Type] = None
)

A set of tasks that share the same properties.

In the pool properties, you set the task price, overlap, Toloker selection filters, quality control rules, and so on.

Pool tasks are grouped into task suites. Whole task suites are assigned to Tolokers.

Learn more about:

Parameters description

ParametersTypeDescription
project_idOptional[str]

The ID of the project containing the pool.

private_nameOptional[str]

The pool name. It is visible to the requester and is not visible to Tolokers.

may_contain_adult_contentOptional[bool]

The presence of adult content.

reward_per_assignmentOptional[float]

Payment in US dollars for a Toloker for completing a task suite. For cents, use the dot as a separator. If the pool type is REGULAR, the minimum payment per task suite is $0.005. For other pool types, you can set the reward_per_assignment to zero.

assignment_max_duration_secondsOptional[int]

Time limit to complete one task suite. Take into account loading a page with a task suite and sending responses to the server. It is recommended that you set at least 60 seconds. Tasks not completed within the limit are reassigned to other Tolokers.

defaultsOptional[Defaults]

Default settings that are applied to new tasks in the pool.

will_expireOptional[datetime]

The UTC date and time when the pool is closed automatically, even if not all tasks are completed.

private_commentOptional[str]

A comment about the pool. It is visible to the requester and is not visible to Tolokers.

public_descriptionOptional[str]

The pool description. If pool's public_description is not set, then project's public_description is used.

public_instructionsOptional[str]

The pool instructions for Tolokers. If pool's public_instructions is not set, then project's public_instructions is used.

auto_close_after_complete_delay_secondsOptional[int]

The pool remains open after all tasks are completed during the specified time in seconds. Use non zero value if:

  • You process data in real time.
  • The pool must stay open so that you can upload new tasks.
  • Dynamic overlap is enabled in the pool.

Allowed range: from 0 to 259200 seconds (3 days). The default value is 0.

dynamic_pricing_configOptional[DynamicPricingConfig]

The dynamic pricing settings.

auto_accept_solutionsOptional[bool]
  • True — Responses from Tolokers are accepted or rejected automatically based on some rules.
  • False — Responses are checked manually. Time reserved for checking is limited by the auto_accept_period_day parameter. Learn more about non-automatic acceptance.
auto_accept_period_dayOptional[int]

The number of days reserved for checking responses if the auto_accept_solutions parameter is set to False.

assignments_issuing_configOptional[AssignmentsIssuingConfig]

Settings for assigning tasks in the pool.

priorityOptional[int]

The priority of the pool in relation to other pools in the project with the same task price and set of filters. Tolokers are assigned tasks with a higher priority first.

Allowed range: from 0 to 100. The default value is 0.

filterOptional[FilterCondition]

Settings for Toloker selection filters.

quality_controlOptional[QualityControl]

Settings for quality control rules and the ID of the pool with training tasks.

speed_quality_balanceOptional[SpeedQualityBalanceConfig]

Settings for choosing Tolokers for your tasks.

dynamic_overlap_configOptional[DynamicOverlapConfig]

Dynamic overlap settings.

mixer_configOptional[MixerConfig]

Parameters for automatically creating task suites.

training_configOptional[TrainingConfig]

Additional settings for linked training.

metadataOptional[Dict[str, List[str]]]

A dictionary with metadata.

ownerOptional[Owner]

The pool owner.

idOptional[str]

The ID of the pool. Read-only field.

statusOptional[Status]

The status of the pool. Read-only field.

last_close_reasonOptional[CloseReason]

A reason why the pool was closed last time. Read-only field.

createdOptional[datetime]

The UTC date and time when the pool was created. Read-only field.

last_startedOptional[datetime]

The UTC date and time when the pool was started last time. Read-only field.

last_stoppedOptional[datetime]

The UTC date and time when the pool was stopped last time. Read-only field.

typeOptional[Type]

The type of the pool. Deprecated.

Examples:

Creating a new pool.

new_pool = toloka.client.Pool(
project_id='92694',
private_name='Experimental pool',
may_contain_adult_content=False,
will_expire=datetime.datetime.now(datetime.timezone.utc) + datetime.timedelta(days=365),
reward_per_assignment=0.01,
assignment_max_duration_seconds=60*20,
defaults=toloka.client.Pool.Defaults(default_overlap_for_new_task_suites=3),
filter=toloka.client.filter.Languages.in_('EN'),
)
new_pool.set_mixer_config(real_tasks_count=10)
new_pool = toloka_client.create_pool(new_pool)
print(new_pool.id)

Methods summary

MethodDescription
is_archivedNone
is_closedNone
is_lockedNone
is_openNone
set_assignments_issuing_configA shortcut setter for assignments_issuing_config
set_captcha_frequencyA shortcut setter for quality_control.captcha_frequency
set_checkpoints_configA shortcut setter for quality_control.checkpoints_config
set_defaultsA shortcut setter for defaults
set_dynamic_overlap_configA shortcut setter for dynamic_overlap_config
set_dynamic_pricing_configA shortcut setter for dynamic_pricing_config
set_filterA shortcut setter for filter
set_mixer_configA shortcut setter for mixer_config
set_ownerA shortcut setter for owner
set_quality_controlA shortcut setter for quality_control
set_quality_control_configsA shortcut method for setting
set_speed_quality_balanceA shortcut setter for speed_quality_balance
set_training_configA shortcut setter for training_config
set_training_requirementA shortcut setter for quality_control.training_requirement

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