Control Plane¶
This module contains optional helpers that add extra debug and control handlers into your application.
- torch.distributed.elastic.control_plane.worker_main()[source]¶
This is a context manager that wraps your main entry function. This combines the existing
errors.record
logic as well as a new_WorkerServer
that exposes handlers via a unix socket specified byTorch_WORKER_SERVER_SOCKET
.Example
@worker_main() def main(): pass if __name__=="__main__": main()
- Return type
Generator[None, None, None]