/
op_def.proto
86 lines (65 loc) · 2.28 KB
/
op_def.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// Copyright 2020 Alibaba Group Holding Limited. 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/attr_value.proto";
import "proto/error_codes.proto";
import "proto/graph_def.proto";
import "proto/types.proto";
import "proto/query_args.proto";
message OpDef {
// The name given to this operator.
string name = 1;
// Unique key for every OpDef. Usually generated by analytical engine.
string key = 2;
// The operation name. There may be custom parameters in attrs.
OperationType op = 3;
// Used for store an op's parents, i.e. use which op to produce this op.
repeated string parents = 4;
// Different types of op may create different output.
OutputType output_type = 5;
// Operation-specific configuration.
map<int32, AttrValue> attr = 6;
// arguments that served as application quering parameters.
// Such as source vertex id for SSSP.
QueryArgs query_args = 7;
// mark fetch op or not
bool fetch = 8;
};
// Result of Op
message OpResult {
Code code = 1;
// unique key for every op
string key = 2;
// if success, store the metrics. (e.g. how many seconds used, memory bytes...)
string metrics = 3;
string error_msg = 4;
// result represents app_name or context_key or raw bytes If the op returns a NDArray or DataFrame
bytes result = 5;
// learning graph handle
bytes handle = 6;
// learning graph config
bytes config = 7;
// extra info for specific op
// 1) CREATE_INTERACTIVE_QUERY: object id
// 2) CREATE_LEARNING_INSTANCE: object_id
bytes extra_info = 8;
// if the op create a graph or modify a graph, return the meta data of the graph.
gs.rpc.graph.GraphDefPb graph_def = 31;
};
// Consist by list of ops.
message DagDef {
repeated OpDef op = 1;
};