MCPcopy
hub / github.com/dmlc/dgl / get_all_remote_pids

Function get_all_remote_pids

tools/distgraphlaunch.py:178–189  ·  view source on GitHub ↗

Get all remote processes.

(hosts, ssh_port, udf_command)

Source from the content-addressed store, hash-verified

176
177
178def get_all_remote_pids(hosts, ssh_port, udf_command):
179 """Get all remote processes."""
180 remote_pids = {}
181 for node_id, host in enumerate(hosts):
182 ip, _ = host
183 # When creating training processes in remote machines, we may insert some arguments
184 # in the commands. We need to use regular expressions to match the modified command.
185 cmds = udf_command.split()
186 new_udf_command = " .*".join(cmds)
187 pids = get_remote_pids(ip, ssh_port, new_udf_command)
188 remote_pids[(ip, ssh_port)] = pids
189 return remote_pids
190
191
192def construct_torch_dist_launcher_cmd(

Callers 1

cleanup_procFunction · 0.70

Calls 2

get_remote_pidsFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected