【问题标题】:Possible to add a worker on-the-fly?可以即时添加工作人员吗?
【发布时间】:2020-05-25 15:28:05
【问题描述】:

启动 TensorFlow 服务器 (tf.distribute.Server) 时,您必须传递一个 ClusterSpec,它指定集群中的所有任务/工作人员。

在您启动服务器后,是否可以向其添加更多工作人员?怎么样?

如果没有,为什么不呢?

(这个和问题有关,why does the server need to know at all about all the workers in advance? 虽然不是同一个问题。)

(这也与问题有关,what operators are there for remote communication? 目前我只知道这个(官方)distributed TensorFlow 功能,通过带有ClusterSpec 的 TF 服务器。 其他非官方的解决方案是例如TensorpackTF ZMQ ops,在这里你可以以任何你想要的方式进行通信(通过 ZeroMQ),而且你也不需要事先/提前了解整个集群。)

【问题讨论】:

    标签: python tensorflow


    【解决方案1】:

    开箱即用,我认为不可能向正在运行的服务器添加更多工作人员/任务。

    tf.distribute.Server class 使用TensorFlow's low-level C API 的服务器类。这个类提供了一个UpdateServerDef method,它可能可以用来修改正在运行的服务器的配置,从而改变工作人员/任务。

    但是,这种更新方法并没有通过TensorFlow python binding 公开,所以除非你愿意修改和编译自己的 TensorFlow C 内核,否则我认为这是不可能的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-10-24
      • 2015-08-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多