toloka.client.TolokaClient.close_training_async | Source code
close_training_async(self, training_id: str)
Stops distributing tasks from the training, asynchronous version
ID of the training that will be closed.
An operation upon completion of which you can get the training with updated status. If training is already closed then None is returned.
open_training = next(toloka_client.get_trainings(status='OPEN')) close_training = toloka_client.close_training_async(training_id=open_training.id) toloka_client.wait_operation(close_training)