Change task overlap

Increase the overlap of a task when you need more Tolokers to complete it.

Steps to follow

1. Import Toloka-Kit

Connect the Toloka-Kit library to your script.

import toloka.client as toloka

2. Instantiate TolokaClient

Replace the sample API key with your own one.

toloka_client = toloka.
TolokaClient
('PlaceYourRealApiKey_Here', 'PRODUCTION');

3. Change task overlap

Find out the ID of the task which you want to modify. Then change the task overlap calling the patch_task() method.

task = toloka_client.
patch_task
('00022da5a7--6388b40547c84000494cdc5a', overlap=5)

4. Display resulting task overlap

The patch_task() request will return the Task class object. You can use its attributes to print the information you need.

print(task.id, task.overlap)

You should get an output with the task ID and modified overlap which looks like this.

00022da5a7--6388b40547c84000494cdc5a 5

Complete code: Change task overlap

import toloka.client as toloka
toloka_client = toloka.TolokaClient('PlaceYourRealApiKey_Here', 'PRODUCTION')
task = toloka_client.patch_task('00022da5a7--6388b40547c84000494cdc5a', overlap=5)
print(task.id, task.overlap)
List of classes and methods used in this recipe

See also

Last updated: February 7, 2023

Toloka-Kit
OverviewGetting API keyQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming