tensorflow/core/protobuf/cluster.proto

//tensorflow/tensorflow/r1.11/tensorflow/core/protobuf/cluster.proto

syntax = "proto3";
package tensorflow;
option cc_enable_arenas = true;
option java_outer_classname = "ClusterProtos";
option java_multiple_files = true;
option java_package = "org.tensorflow.distruntime";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf";

// This file contains protos to be used when defining a TensorFlow cluster.
//
// 例如:
// --------
//
// 1. 单进程的cluster, containing "/job:local/task:0".
//
//    Cluster:
//      job { name: 'local' tasks { key: 0 value: 'localhost:2222' } }
//
//    Server:
//      cluster { $CLUSTER } job_name: 'local' task_index: 0
//
// 2. 两个进程的cluster, containing "/job:local/task:{0,1}".
//
//    Cluster:
//      job { name: 'local' tasks { key: 0 value: 'localhost:2222' }
//                          tasks { key: 1 value: 'localhost:2223' } }
//
//    Servers:
//      cluster { $CLUSTER } job_name: 'local' task_index: 0
//      cluster { $CLUSTER } job_name: 'local' task_index: 1
//
// 3. 两个job的cluster, containing "/job:worker/task:{0,1,2}" and "/job:ps/task:{0,1}".
//
//    Cluster:
//      job { name: 'worker' tasks { key: 0 value: 'worker1:2222' }
//                           tasks { key: 1 value: 'worker2:2222' }
//                           tasks { key: 2 value: 'worker3:2222' } }
//      job { name: 'ps'     tasks { key: 0 value: 'ps0:2222' }
//                           tasks { key: 1 value: 'ps1:2222' } }
//
//    Servers:
//      cluster { $CLUSTER } job_name: 'worker' task_index: 0
//      cluster { $CLUSTER } job_name: 'worker' task_index: 1
//      cluster { $CLUSTER } job_name: 'worker' task_index: 2
//      cluster { $CLUSTER } job_name: 'ps'     task_index: 0
//      cluster { $CLUSTER } job_name: 'ps'     task_index: 1

// 在一个TensorFlow cluster中定义一个Job.
message JobDef {
  // 当前job的名字.
  string name = 1;

  // 从task ID到"hostname:port"字符串的映射表.
  // 如果`name`字段包含"worker", 且`tasks`包含一个从7到"example.org:2222"的映射表, 则设备前缀 "/job:worker/task:7" 将赋值给 "example.org:2222".
  map tasks = 2;
}

// 定义一个TensorFlow cluster作为jobs的集合.
message ClusterDef {
  // 组成cluster的jobs
  repeated JobDef job = 1;
}

你可能感兴趣的:(TensorFlow)