Metrics#
Created On: Oct 25, 2026 | Last Updated On: Oct 25, 2026
Metric Handlers#
Below are the metric handlers that come included with torchelastic.
- class torch.distributed.elastic.metrics.api.MetricData(timestamp, group_name, name, value)#
Methods#
- torch.distributed.elastic.metrics.prof(fn=None, group='torchelastic')[source]#
@prof decorator publishes success, failure and duration.ms metrics for the function that it decorates.
The metric name defaults to the qualified name (
class_name.def_name) of the function. If the function does not belong to a class, it uses the leaf module name instead.Usage
@metrics.prof def x(): pass @metrics.prof(group="agent") def y(): pass