/
attr_value.proto
71 lines (60 loc) · 2.32 KB
/
attr_value.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/**
*
* The file proto/attr_value.proto is referred and derived from project
* tensorflow,
*
* https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/framework/attr_value.proto
*
* which has the following license:
*
*
Copyright 2015 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================
*/
syntax = "proto3";
package gs.rpc;
import "proto/graph_def.proto";
import "proto/types.proto";
// Comment indicates the corresponding attr type. Only the field matching the
// attr type may be filled.
message AttrValue {
enum NullValue { NULL_VALUE = 0; }
message ListValue {
repeated bytes s = 2; // "list(string)"
repeated int64 i = 3 [ packed = true ]; // "list(int)"
repeated float f = 4 [ packed = true ]; // "list(float)"
repeated bool b = 5 [ packed = true ]; // "list(bool)"
repeated DataType type = 6 [ packed = true ]; // "list(type)"
repeated NameAttrList func = 9; // "list(attr)"
repeated ListValue list = 10; // "list(list)
}
oneof value {
NullValue null = 1; // "null"
bytes s = 2; // "string"
int64 i = 3; // "int"
float f = 4; // "float"
bool b = 5; // "bool"
DataType type = 6; // "type"
gs.rpc.graph.GraphTypePb graph_type = 7; // "graph type"
ModifyType modify_type = 8; // "modify type"
ReportType report_type = 9; // "nx report type"
ListValue list = 10; // any "list(...)"
NameAttrList func = 11;
// for lazy mode, inferred from the context of dag
PlaceHolder place_holder = 21;
}
}
// A list of attr names and their values.
message NameAttrList {
string name = 1;
map<int32, AttrValue> attr = 2;
}