为什么分布式tensorflow时间线跟踪将QueueDequeue操作标记为PS操作?
我正在AWS ubuntu机器集群上运行tensorflow分布式inception模型,并通过为什么分布式tensorflow时间线跟踪将QueueDequeue操作标记为PS操作?,tensorflow,tensorflow-serving,Tensorflow,Tensorflow Serving,我正在AWS ubuntu机器集群上运行tensorflow分布式inception模型,并通过 # Track statistics of the run using Timeline run_options = tf.RunOptions(trace_level=tf.RunOptions.FULL_TRACE) run_metadata = tf.RunMetadata() # Run loss_value, step = sess.run([train_op, global_step]
# Track statistics of the run using Timeline
run_options = tf.RunOptions(trace_level=tf.RunOptions.FULL_TRACE)
run_metadata = tf.RunMetadata()
# Run
loss_value, step = sess.run([train_op, global_step], options=run_options, run_metadata=run_metadata)
# Create timeline and write it to a json file
tl = timeline.Timeline(run_metadata.step_stats)
ctf = tl.generate_chrome_trace_format()
with open('timeline%d.json' % FLAGS.task_id, 'w') as f:
f.write(ctf)
当我查看工作机器生成的时间线时,我看到:
请注意右侧的QueueDequeue操作,时间线显示它是/job:ps/replica:0/task:0/cpu:0(一个参数服务器)的一部分
由于如图所示,ScatterUpdate正好在QueueDequeue之后,因此我认为此操作对应于同步副本优化器操作,其中工作人员尝试将令牌出列并执行分散更新:
但如果是这样,则应该由一个工作进程执行此操作,而不是一个参数服务器。为什么时间线显示参数服务器正在执行此操作
我使用的是tensorflow 0.11,仅限CPU。这似乎是正确的,并且出列操作是在PS上执行的。只是工作程序依赖于此操作,这意味着工作程序实际上在等待成功的出列