Toloka documentation


toloka.metrics.jupyter_dashboard.DashBoard | Source code

    metrics: List[Union[BaseMetric, Chart]],
    header: str = 'Toloka metrics dashboard',
    update_seconds: int = 10,
    min_time_range: timedelta = ...,
    max_time_range: timedelta = ...

Toloka dashboard with metrics. Only for jupyter.

Parameters Description

Parameters Type Description
metrics List[Union[BaseMetric, Chart]]

List of metrics or charts, that will be displayed on the dashboard. Each element will be displayed in a separate chart (coordinates). If you want to draw several metrics in one coordinates, wrap it into an instance of the class Chart.

header str

Your pretty header for this dashboard.

update_seconds int

Count of seconds between dash updates.

min_time_range timedelta

The minimum time range for all charts.

max_time_range timedelta

The maximum time range for all charts. If you have more data, you will see only the last range on charts.


How to create online dashboard in jupyter.

import toloka.metrics as metrics
from toloka.metrics.jupyter_dashboard import Chart, DashBoard
import toloka.client as toloka
toloka_client = toloka.TolokaClient(oauth_token, 'PRODUCTION')
new_dash = DashBoard(
        metrics.AssignmentEventsInPool('123', submitted_name='submitted', join_events=True),
            'Manualy configured chart',
            [metrics.AssignmentsInPool('123'), metrics.AssignmentsInPool('345'),]
    header='My cool dash',
metrics.bind_client(new_dash.metrics, toloka_client)
# Then in new cell:
# If you want to stop it:

Methods Summary

Method Description
run_dash Starts dashboard. Starts server for online updating charts.
stop_dash Stops server. And stops updating dashboard.
update_charts Redraws all charts on each iteration