分布式Tensorflow无法使用简单示例

时间:2016-11-29 22:51:07

标签: python tensorflow distributed-computing distributed

我跟随一个例子here来学习MNIST上的分布式TF。我将群集配置更改为:

parameter_servers = ["1.2.3.4:2222"]
workers = [ "1.2.3.4:2222", "5.6.7.8:2222"]

1.2.3.45.6.7.8只是我的两个节点的表示。它们不是真正的IP地址。整个脚本名为example.py

1.2.3.4上,我跑了:python example.py --job_name=ps --task_index=0 然后在同一台机器上,我在另一个终端运行python example --job_name=worker --task_index=0。看起来它只是在等待。

5,6,7,8上,我跑了python example.py --job_name=worker --taks_index=1。之后,我立即在5.6.7.8上收到以下错误:

tensorflow.python.framework.errors.UnavailableError: {"created":"@1480458325.580095889","description":"EOF","file":"external/grpc/src/core/lib/iomgr/tcp_posix.c","file_line":235,"grpc_status":14}
I tensorflow/core/distributed_runtime/master_session.cc:845] DeregisterGraph error: Aborted: Graph handle is not found: . Possibly, this worker just restarted.

tensorflow/core/distributed_runtime/graph_mgr.cc:55] 'unit.device' Must be non NULL
Aborted (core dumped)

on 1.2.3.4

这是因为我在同一台机器上运行参数服务器和工作器吗?我没有超过2个节点,所以如何解决这个问题呢?

1 个答案:

答案 0 :(得分:0)

所以过了一天我终于得到了修复:

  1. 按照雅罗斯拉夫的建议为param服务器做,这样工作人员就不会耗尽GPU内存
  2. param服务器和worker无法在同一端口(原始帖子)上运行,因此将workers = [ "1.2.3.4:2222", "5.6.7.8:2222"]更改为workers = [ "1.2.3.4:2223", "5.6.7.8:2222"]。请注意端口号的更改。
  3. 这就是需要做的一切。

相关问题