Shortcuts

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

torch.distributed.elastic.events.record(event, destination='null')[source]
torch.distributed.elastic.events.get_logging_handler(destination='null')[source]

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.

class torch.distributed.elastic.events.api.EventSource(value)[source]

Known identifiers of the event producers.

torch.distributed.elastic.events.api.EventMetadataValue

alias of Optional[Union[str, int, float, bool]]

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources