File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -334,7 +334,7 @@ cc_library(
334334
335335if (WITH_PYTHON)
336336 py_proto_compile (framework_py_proto SRCS framework .proto data_feed.proto )
337- py_proto_compile (trainer_py_proto SRCS trainer_desc.proto data_feed.proto )
337+ py_proto_compile (trainer_py_proto SRCS trainer_desc.proto )
338338 py_proto_compile (distributed_strategy_py_proto SRCS
339339 distributed_strategy.proto )
340340 py_proto_compile (pass_desc_py_proto SRCS pass_desc.proto )
Original file line number Diff line number Diff line change 1313# limitations under the License.
1414"""Definition of trainers."""
1515
16- import os
17- import sys
18-
1916__all__ = []
2017
2118
@@ -31,15 +28,7 @@ def __init__(self):
3128 with open(proto_file, 'r') as f:
3229 text_format.Parse(f.read(), self.proto_desc)
3330 '''
34- # Workaround for relative import in protobuf under python3
35- # TODO: should be fixed
36- cur_path = os .path .dirname (__file__ )
37- if cur_path not in sys .path :
38- sys .path .append (cur_path )
39- if cur_path + "/proto" not in sys .path :
40- sys .path .append (cur_path + "/proto" )
41-
42- from proto import trainer_desc_pb2
31+ from .proto import trainer_desc_pb2
4332
4433 self .proto_desc = trainer_desc_pb2 .TrainerDesc ()
4534 import multiprocessing as mp
You can’t perform that action at this time.
0 commit comments