Container Metrics
About
Managing many metrics one by one means repeating the sync, compute and reset calls for each of them. Container metrics bundle several metrics and manage them together.
Compose Metric
ComposeMetric wraps a mapping from string keys to Metric instances into a single metric.
You cannot call .update() on a ComposeMetric, because its children can take different arguments. Update the children directly instead. The lifecycle methods .sync(), .compute(), .reset(), .to(), .state_dict() and .load_state_dict() apply to all children.
Usage
API Reference
d9d.metric.impl.container.ComposeMetric
Container metric that groups named child metrics into one metric.
Synchronization, computation, reset, device moves and checkpointing apply to all children. compute()
returns a dictionary with the result of each child. Update the children directly.
children
property
The child metrics by name.
__getitem__(item)
Returns the child metric with the given name.
__init__(children)
update(*args, **kwargs)
Always raises, because the children must be updated directly.
Raises:
| Type | Description |
|---|---|
ValueError
|
If called. |