Events¶
Module contains events processing mechanisms that are integrated with the standard python logging.
Example of usage:
from torch.distributed.elastic import events
event = events.Event(name="test_event", source=events.EventSource.WORKER, metadata={...})
events.get_logging_handler(destination="console").info(event)
API Methods¶
Event Objects¶
-
class
torch.distributed.elastic.events.api.
Event
(name, source, timestamp=0, metadata=<factory>)[source]¶ The class represents the generic event that occurs during the torchelastic job execution. The event can be any kind of meaningful action.
- Parameters
name – event name.
source – the event producer, e.g. agent or worker
timestamp – timestamp in milliseconds when event occured.
metadata – additional data that is associated with the event.