PoolCompletedPercentage

toloka.metrics.pool_metrics.PoolCompletedPercentage | Source code

PoolCompletedPercentage(
self,
pool_id: str,
percents_name: Optional[str] = None,
*,
toloka_client: Optional[TolokaClient] = None,
atoloka_client: Optional[AsyncTolokaClient] = None,
timeout: timedelta = ...
)

Track pool completion in percentage

You can't gather this metric from a pool with infinite task suites. For example, if you have infinite overlap on a pool.

Parameters description

ParametersTypeDescription
pool_idstr

From which pool track metrics.

percents_nameOptional[str]

Metric name for pool completion percentage. Default 'completion_percentage'.

toloka_clientOptional[TolokaClient]

Client for connection to Toloka. You can set toloka_client for several metrics via "bind_client" function.

Examples:

How to collect this metric:

def print_metric(metric_dict):
print(metric_dict)
collector = MetricCollector([PoolCompletedPercentage(pool_id, toloka_client=toloka_client)], print_metric)
asyncio.run(collector.run())
{
'completion_percentage': [(datetime.datetime(2021, 8, 11, 15, 13, 4, 31000), 55)],
}

Methods summary

MethodDescription
get_line_namesReturns a list of metric names that can be generated by this class instance.

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