module_desc.proto 1.5 KB
Newer Older
Z
Zeyu Chen 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// Copyright 2018 The Paddle 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.
// =============================================================================
Z
Zeyu Chen 已提交
15

Z
Zeyu Chen 已提交
16
syntax = "proto3";
Z
Zeyu Chen 已提交
17
option optimize_for = LITE_RUNTIME;
Z
Zeyu Chen 已提交
18

Z
Zeyu Chen 已提交
19
package paddle_hub;
Z
Zeyu Chen 已提交
20

Z
Zeyu Chen 已提交
21
// Feed Variable Description
Z
Zeyu Chen 已提交
22
message FeedDesc {
Z
Zeyu Chen 已提交
23
  string var_name = 1;
Z
Zeyu Chen 已提交
24
};
Z
Zeyu Chen 已提交
25

Z
Zeyu Chen 已提交
26
// Fetch Variable Description
Z
Zeyu Chen 已提交
27
message FetchDesc {
Z
Zeyu Chen 已提交
28
  string var_name = 1;
Z
Zeyu Chen 已提交
29 30
};

Z
Zeyu Chen 已提交
31
// Module Variable
Z
Zeyu Chen 已提交
32 33 34 35 36
message ModuleVar {
  repeated FetchDesc fetch_desc = 1;
  repeated FeedDesc feed_desc = 2;
}

Z
Zeyu Chen 已提交
37
// A Hub Module is stored in a directory with a file 'paddlehub.pb'
Z
Zeyu Chen 已提交
38 39 40
// containing a serialized protocol message of this type. The further contents
// of the directory depend on the storage format described by the message.
message ModuleDesc {
Z
Zeyu Chen 已提交
41
  // PaddleHub module name
Z
Zeyu Chen 已提交
42
  string name = 1; // PaddleHub module name
Z
Zeyu Chen 已提交
43
  
Z
Zeyu Chen 已提交
44
  // signature to module variable
Z
Zeyu Chen 已提交
45
  map<string, ModuleVar> sign2var = 2;
Z
Zeyu Chen 已提交
46

W
wuzewu 已提交
47
  bool return_numpy = 3;
Z
Zeyu Chen 已提交
48

W
wuzewu 已提交
49
  bool contain_assets = 4;
Z
Zeyu Chen 已提交
50

51
  string version = 5;
Z
Zeyu Chen 已提交
52
};
Z
Zeyu Chen 已提交
53