• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1syntax = "proto3";
2
3package tensorflow.data.experimental;
4
5option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto";
6
7// Configuration for a tf.data service DispatchServer.
8message DispatcherConfig {
9  // The port for the dispatcher to bind to. A value of 0 indicates that the
10  // dispatcher may bind to any available port.
11  int64 port = 1;
12  // The protocol for the dispatcher to use when connecting to workers.
13  string protocol = 2;
14  // A work directory to use for storing dispatcher state, and for recovering
15  // during restarts. The empty string indicates not to use any work directory.
16  string work_dir = 3;
17  // Whether to run in fault tolerant mode, where dispatcher state is saved
18  // across restarts. Requires that `work_dir` is nonempty.
19  bool fault_tolerant_mode = 4;
20  // (Optional.) If the job uses auto-sharding, it needs to specify a fixed list
21  // of worker addresses that will register with the dispatcher. The worker
22  // addresses should be in the format "host" or "host:port", where "port" is an
23  // integer, named port, or %port% to match any port.
24  // TODO(yangchen): Also add a deployment mode flag. Auto-sharding will only be
25  // allowed in the "COLOCATED" mode.
26  repeated string worker_addresses = 7;
27  // How often the dispatcher should scan through to delete old and unused jobs.
28  int64 job_gc_check_interval_ms = 5;
29  // How long a job needs to be unused before it becomes a candidate for garbage
30  // collection. A value of -1 indicates that jobs should never be garbage
31  // collected.
32  int64 job_gc_timeout_ms = 6;
33}
34
35// Configuration for a tf.data service WorkerServer.
36message WorkerConfig {
37  // The port for the worker to bind to. A value of 0 indicates that the
38  // worker may bind to any available port.
39  int64 port = 1;
40  // The protocol for the worker to use when connecting to the dispatcher.
41  string protocol = 2;
42  // The address of the dispatcher to register with.
43  string dispatcher_address = 3;
44  // The address of the worker server. The substring "%port%", if specified,
45  // will be replaced with the worker's bound port. This is useful when the port
46  // is set to `0`.
47  string worker_address = 4;
48  // How often the worker should heartbeat to the master.
49  int64 heartbeat_interval_ms = 5;
50  // How long to retry requests to the dispatcher before giving up and reporting
51  // an error.
52  int64 dispatcher_timeout_ms = 6;
53  // The protocol for the worker to use when transferring data to clients.
54  string data_transfer_protocol = 7;
55  // The data transfer address of the worker server. The substring "%port%", if
56  // specified, will be replaced with the worker's bound port. This is useful
57  // when the port is set to `0`.
58  string data_transfer_address = 8;
59  // When shutting down a worker, how long to wait for the gRPC server to
60  // process the final requests. This is used to achieve clean shutdown in unit
61  // tests.
62  int64 shutdown_quiet_period_ms = 9;
63}
64