archive_training_async

toloka.client.TolokaClient.archive_training_async | Source code

archive_training_async(self, training_id: str)

Archives a training. Sends an asynchronous request to Toloka.

Only closed trainings can be archived.

You can access archived trainings later.

Parameters description

ParametersTypeDescription
training_idstr

The ID of the training to be archived.

  • Returns:

    An object to track the progress of the operation. If the training is already archived then None is returned.

  • Return type:

    Optional[TrainingArchiveOperation]

Examples:

closed_training = next(toloka_client.find_trainings(status='CLOSED'))
archive_op = toloka_client.archive_training_async(training_id=closed_training.id)
toloka_client.wait_operation(archive_op)

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