1syntax = "proto3";
2
3package tensorflow.data;
4
5import "tensorflow/core/framework/graph.proto";
6
7message DatasetDef {
8  // We represent datasets as tensorflow GraphDefs which define the operations
9  // needed to create a tf.data dataset.
10  GraphDef graph = 1;
11}
12
13message TaskDef {
14  // The dataset to iterate over.
15  oneof dataset {
16    DatasetDef dataset_def = 1;
17    string path = 2;
18  }
19  int64 dataset_id = 3;
20  int64 task_id = 4;
21  int64 job_id = 5;
22  ProcessingModeDef processing_mode = 6;
23  // Optional number of consumers. If set, the results of the task will be
24  // provided to consumers round-robin.
25  oneof optional_num_consumers {
26    int64 num_consumers = 7;
27  }
28}
29
30message TaskInfo {
31  // The address of the worker processing the task.
32  string worker_address = 1;
33  // The transfer address of the worker processing the task.
34  string transfer_address = 4;
35  // The task id.
36  int64 task_id = 2;
37  // The id of the job that the task is part of.
38  int64 job_id = 3;
39  // The round to start reading from the task in. For non-round-robin reads,
40  // this is always 0.
41  int64 starting_round = 5;
42}
43
44enum ProcessingModeDef {
45  INVALID = 0;
46  // Each tf.data worker processes an entire epoch.
47  PARALLEL_EPOCHS = 1;
48  // Processing of an epoch is distributed across all tf.data workers.
49  DISTRIBUTED_EPOCH = 2;
50}
51