mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-08 07:39:33 +01:00
Summary: https://github.com/pytorch/pytorch/pull/28226 introduced `worker_to_id` arg to the `def init_rpc` function for other `RpcAgent`. While it's not really used by `ProcessGroupAgent`. Cleanup is wanted for this, as described in https://github.com/pytorch/pytorch/issues/29031. To adapt to the difference of different `RpcAgent`, adding a `RpcAgentOptions` base classes, which allow leveraging inheritance to add extra fields. closes https://github.com/pytorch/pytorch/issues/29031 Pull Request resolved: https://github.com/pytorch/pytorch/pull/29972 Differential Revision: D18549919 Pulled By: xush6528 fbshipit-source-id: b9f3f1a41d1ff18498734081870820b055d56f5b
10 lines
158 B
Python
10 lines
158 B
Python
from datetime import timedelta
|
|
|
|
|
|
# For any RpcAgent.
|
|
DEFAULT_RPC_TIMEOUT = timedelta(seconds=60)
|
|
|
|
|
|
# For ProcessGroupAgent.
|
|
DEFAULT_NUM_SEND_RECV_THREADS = 4
|