table
TableMetric
¶
Bases: Metric
Synchronizes the state of a dict[str, list[Any]]
across multiple worker processes.
compute
¶
Return the aggregated table.
Raises:
Type | Description |
---|---|
ValueError
|
If no updates have been performed yet. |
Returns:
Type | Description |
---|---|
dict[str, list[Any]]
|
The aggregated table. |
update
¶
Aggregate the incoming update from all workers processes and share it with all other worker processes.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
dict[str, list[Any]]
|
Additional rows to add to the aggregated table. |
required |
Raises:
Type | Description |
---|---|
ValueError
|
If the table update has no columns. |
ValueError
|
If the table update's keys does not match the aggregated table's keys. |
ValueError
|
If the table update's values are not lists. |
ValueError
|
If the table update's lists are not all of equal length. |
ValueError
|
If the table update has no rows. |