Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

Commit 232032e

Browse files
aivanoufacebook-github-bot
authored andcommitted
Make small improvements to the events documentation
Summary: Make small improvements to the events documentation Reviewed By: kiukchung Differential Revision: D21241412 fbshipit-source-id: 6ec772918b9a2767c787f9a129ae5ffa790a0a40
1 parent 7ccd595 commit 232032e

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

docs/source/customization.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ Events Handler
8989
-----------------------------
9090

9191
TorchElastic supports events recording (see :ref:`events-api`).
92+
The events module defines API that allows you to record events and
93+
implement custom EventHandler. EventHandler is used for publishing events
94+
produced during torchelastic execution to different sources, e.g. AWS CloudWatch.
9295
By default it uses `torchelastic.events.NullEventHandler` that ignores
9396
events. To configure custom events handler you need to implement
9497
`torchelastic.events.EventHandler` interface and `configure` it

torchelastic/events/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
The event API is used to publish and process events. The module can be used
1414
to capture state transitions to debug or give insight into the execution
1515
flow. The :py:class:`torchelastic.events.Event` is an object containing information
16-
about an occurrence during the execution of the program.
16+
about an occurrence during the execution of the program. The destination handler
17+
for events can be configured by the event type parameter.
1718
1819
1920
.. note:: The event type ``torchelastic`` is reserved by torchelastic for
@@ -26,7 +27,7 @@
2627
of usage and consists of two parts: handler configuration and event publishing.
2728
2829
The example below shows the simple event publishing mechanism
29-
via :py:meth:`torchelastic.events.record_record` method.
30+
via :py:meth:`torchelastic.events.record_event` method.
3031
3132
::
3233

0 commit comments

Comments
 (0)