分布式训练,ps servers 分配哪些参数,workers分配哪些数据是在什么地方实现的
- Dominant language
- C++
- Stars
- 2.9k
- Forks
- 553
- PR merge metrics
- No merged PRs in 30d
Description
分布式训练,ps servers 分配哪些参数,workers分配哪些数据是在什么地方实现的
只看到run_loop.py 里有一个run_distributed()函数
def run_distributed(flags_obj, run):
cluster = tf.train.ClusterSpec({
'ps': flags_obj.ps_hosts,
'worker': flags_obj.worker_hosts
})
server = tf.train.Server(
cluster, job_name=flags_obj.job_name, task_index=flags_obj.task_index)
if flags_obj.job_name == 'ps':
server.join()
elif flags_obj.job_name == 'worker':
if not euler_ops.initialize_shared_graph(directory=flags_obj.data_dir,
zk_addr=flags_obj.euler_zk_addr,
zk_path=flags_obj.euler_zk_path,
shard_idx=flags_obj.task_index,
shard_num=len(flags_obj.worker_hosts),
global_sampler_type='node'):
raise RuntimeError('Failed to initialize graph.')
with tf.device(
tf.train.replica_device_setter(
worker_device='/job:worker/task:%d' % flags_obj.task_index,
cluster=cluster)):
run(flags_obj, server.target, flags_obj.task_index == 0)
else:
raise ValueError('Unsupport role: {}'.format(flags_obj.job_name))
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with run_loop.py and its run_distributed() function, then trace tf.train.ClusterSpec, tf.train.Server, and euler_ops.initialize_shared_graph. Document where parameter placement on ps servers and data assignment across workers are implemented, including the role of task_index and worker_hosts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, tensorflow
- Domain
- distributed-systems, machine-learning
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100