1Expiration Timers 2================== 3 4.. automodule:: torch.distributed.elastic.timer 5.. currentmodule:: torch.distributed.elastic.timer 6 7Client Methods 8--------------- 9.. autofunction:: torch.distributed.elastic.timer.configure 10 11.. autofunction:: torch.distributed.elastic.timer.expires 12 13Server/Client Implementations 14------------------------------ 15Below are the timer server and client pairs that are provided by torchelastic. 16 17.. note:: Timer server and clients always have to be implemented and used 18 in pairs since there is a messaging protocol between the server 19 and client. 20 21Below is a pair of timer server and client that is implemented based on 22a ``multiprocess.Queue``. 23 24.. autoclass:: LocalTimerServer 25 26.. autoclass:: LocalTimerClient 27 28Below is another pair of timer server and client that is implemented 29based on a named pipe. 30 31.. autoclass:: FileTimerServer 32 33.. autoclass:: FileTimerClient 34 35 36Writing a custom timer server/client 37-------------------------------------- 38 39To write your own timer server and client extend the 40``torch.distributed.elastic.timer.TimerServer`` for the server and 41``torch.distributed.elastic.timer.TimerClient`` for the client. The 42``TimerRequest`` object is used to pass messages between 43the server and client. 44 45.. autoclass:: TimerRequest 46 :members: 47 48.. autoclass:: TimerServer 49 :members: 50 51.. autoclass:: TimerClient 52 :members: 53 54 55Debug info logging 56------------------- 57 58.. automodule:: torch.distributed.elastic.timer.debug_info_logging 59 60.. autofunction:: torch.distributed.elastic.timer.debug_info_logging.log_debug_info_for_expired_timers 61