From 3820db6ac8b9e6f1b4000b0616176c9dcb794191 Mon Sep 17 00:00:00 2001 From: hanhxiao Date: Wed, 21 Aug 2019 16:21:33 +0800 Subject: [PATCH] tests(encoder): rename BasePytorchEncoder to TorchvisionEncoder --- tests/proto_s/dummy_pb2.py | 331 +++++++++---------- tests/proto_s/dummy_pb2_grpc.py | 61 ++-- tests/yaml/inception-encoder.yml | 2 +- tests/yaml/mobilenet-encoder.yml | 2 +- tests/yaml/preprocessor2.yml | 7 - tests/yaml/resnet-encoder.yml | 2 +- tests/yaml/vgg-encoder.yml | 2 +- tutorials/component-yaml-spec.md | 12 +- yaml-example/component/encoder.inception.yml | 2 +- yaml-example/component/encoder.resnet.yml | 2 +- yaml-example/component/encoder.vgg.yml | 2 +- 11 files changed, 207 insertions(+), 218 deletions(-) delete mode 100644 tests/yaml/preprocessor2.yml diff --git a/tests/proto_s/dummy_pb2.py b/tests/proto_s/dummy_pb2.py index 4639327b..d09cfd1d 100644 --- a/tests/proto_s/dummy_pb2.py +++ b/tests/proto_s/dummy_pb2.py @@ -3,162 +3,159 @@ # source: dummy.proto import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) + +_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() - from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 - DESCRIPTOR = _descriptor.FileDescriptor( - name='dummy.proto', - package='dummy', - syntax='proto3', - serialized_options=None, - serialized_pb=_b('\n\x0b\x64ummy.proto\x12\x05\x64ummy\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd5\x01\n\x08\x45nvelope\x12\x11\n\tclient_id\x18\x01 \x01(\t\x12\x12\n\nrequest_id\x18\x02 \x01(\t\x12\x0f\n\x07part_id\x18\x03 \x01(\r\x12\x10\n\x08num_part\x18\x04 \x03(\r\x12\x0f\n\x07timeout\x18\x05 \x01(\r\x12%\n\x06routes\x18\x06 \x03(\x0b\x32\x15.dummy.Envelope.route\x1aG\n\x05route\x12\x0f\n\x07service\x18\x01 \x01(\t\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\",\n\x07Message\x12!\n\x08\x65nvelope\x18\x01 \x01(\x0b\x32\x0f.dummy.Envelope2@\n\x10\x44ummyGRPCService\x12,\n\x08\x64ummyAPI\x12\x0e.dummy.Message\x1a\x0e.dummy.Message\"\x00\x62\x06proto3') - , - dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) - - - + name='dummy.proto', + package='dummy', + syntax='proto3', + serialized_options=None, + serialized_pb=_b( + '\n\x0b\x64ummy.proto\x12\x05\x64ummy\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd5\x01\n\x08\x45nvelope\x12\x11\n\tclient_id\x18\x01 \x01(\t\x12\x12\n\nrequest_id\x18\x02 \x01(\t\x12\x0f\n\x07part_id\x18\x03 \x01(\r\x12\x10\n\x08num_part\x18\x04 \x03(\r\x12\x0f\n\x07timeout\x18\x05 \x01(\r\x12%\n\x06routes\x18\x06 \x03(\x0b\x32\x15.dummy.Envelope.route\x1aG\n\x05route\x12\x0f\n\x07service\x18\x01 \x01(\t\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\",\n\x07Message\x12!\n\x08\x65nvelope\x18\x01 \x01(\x0b\x32\x0f.dummy.Envelope2@\n\x10\x44ummyGRPCService\x12,\n\x08\x64ummyAPI\x12\x0e.dummy.Message\x1a\x0e.dummy.Message\"\x00\x62\x06proto3') + , + dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, ]) _ENVELOPE_ROUTE = _descriptor.Descriptor( - name='route', - full_name='dummy.Envelope.route', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='service', full_name='dummy.Envelope.route.service', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='timestamp', full_name='dummy.Envelope.route.timestamp', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=198, - serialized_end=269, + name='route', + full_name='dummy.Envelope.route', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='service', full_name='dummy.Envelope.route.service', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='timestamp', full_name='dummy.Envelope.route.timestamp', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=198, + serialized_end=269, ) _ENVELOPE = _descriptor.Descriptor( - name='Envelope', - full_name='dummy.Envelope', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='client_id', full_name='dummy.Envelope.client_id', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='request_id', full_name='dummy.Envelope.request_id', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='part_id', full_name='dummy.Envelope.part_id', index=2, - number=3, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='num_part', full_name='dummy.Envelope.num_part', index=3, - number=4, type=13, cpp_type=3, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='timeout', full_name='dummy.Envelope.timeout', index=4, - number=5, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='routes', full_name='dummy.Envelope.routes', index=5, - number=6, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[_ENVELOPE_ROUTE, ], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=56, - serialized_end=269, + name='Envelope', + full_name='dummy.Envelope', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='client_id', full_name='dummy.Envelope.client_id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='request_id', full_name='dummy.Envelope.request_id', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='part_id', full_name='dummy.Envelope.part_id', index=2, + number=3, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='num_part', full_name='dummy.Envelope.num_part', index=3, + number=4, type=13, cpp_type=3, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='timeout', full_name='dummy.Envelope.timeout', index=4, + number=5, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='routes', full_name='dummy.Envelope.routes', index=5, + number=6, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[_ENVELOPE_ROUTE, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=56, + serialized_end=269, ) - _MESSAGE = _descriptor.Descriptor( - name='Message', - full_name='dummy.Message', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='envelope', full_name='dummy.Message.envelope', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=271, - serialized_end=315, + name='Message', + full_name='dummy.Message', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='envelope', full_name='dummy.Message.envelope', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=271, + serialized_end=315, ) _ENVELOPE_ROUTE.fields_by_name['timestamp'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP @@ -171,47 +168,45 @@ Envelope = _reflection.GeneratedProtocolMessageType('Envelope', (_message.Message,), dict( - route = _reflection.GeneratedProtocolMessageType('route', (_message.Message,), dict( - DESCRIPTOR = _ENVELOPE_ROUTE, - __module__ = 'dummy_pb2' - # @@protoc_insertion_point(class_scope:dummy.Envelope.route) + route=_reflection.GeneratedProtocolMessageType('route', (_message.Message,), dict( + DESCRIPTOR=_ENVELOPE_ROUTE, + __module__='dummy_pb2' + # @@protoc_insertion_point(class_scope:dummy.Envelope.route) )) - , - DESCRIPTOR = _ENVELOPE, - __module__ = 'dummy_pb2' - # @@protoc_insertion_point(class_scope:dummy.Envelope) - )) + , + DESCRIPTOR=_ENVELOPE, + __module__='dummy_pb2' + # @@protoc_insertion_point(class_scope:dummy.Envelope) +)) _sym_db.RegisterMessage(Envelope) _sym_db.RegisterMessage(Envelope.route) Message = _reflection.GeneratedProtocolMessageType('Message', (_message.Message,), dict( - DESCRIPTOR = _MESSAGE, - __module__ = 'dummy_pb2' - # @@protoc_insertion_point(class_scope:dummy.Message) - )) + DESCRIPTOR=_MESSAGE, + __module__='dummy_pb2' + # @@protoc_insertion_point(class_scope:dummy.Message) +)) _sym_db.RegisterMessage(Message) - - _DUMMYGRPCSERVICE = _descriptor.ServiceDescriptor( - name='DummyGRPCService', - full_name='dummy.DummyGRPCService', - file=DESCRIPTOR, - index=0, - serialized_options=None, - serialized_start=317, - serialized_end=381, - methods=[ - _descriptor.MethodDescriptor( - name='dummyAPI', - full_name='dummy.DummyGRPCService.dummyAPI', + name='DummyGRPCService', + full_name='dummy.DummyGRPCService', + file=DESCRIPTOR, index=0, - containing_service=None, - input_type=_MESSAGE, - output_type=_MESSAGE, serialized_options=None, - ), -]) + serialized_start=317, + serialized_end=381, + methods=[ + _descriptor.MethodDescriptor( + name='dummyAPI', + full_name='dummy.DummyGRPCService.dummyAPI', + index=0, + containing_service=None, + input_type=_MESSAGE, + output_type=_MESSAGE, + serialized_options=None, + ), + ]) _sym_db.RegisterServiceDescriptor(_DUMMYGRPCSERVICE) DESCRIPTOR.services_by_name['DummyGRPCService'] = _DUMMYGRPCSERVICE diff --git a/tests/proto_s/dummy_pb2_grpc.py b/tests/proto_s/dummy_pb2_grpc.py index 0279e9ab..946c7e55 100644 --- a/tests/proto_s/dummy_pb2_grpc.py +++ b/tests/proto_s/dummy_pb2_grpc.py @@ -3,43 +3,44 @@ from . import dummy_pb2 as dummy__pb2 + class DummyGRPCServiceStub(object): - # missing associated documentation comment in .proto file - pass - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.dummyAPI = channel.unary_unary( - '/dummy.DummyGRPCService/dummyAPI', - request_serializer=dummy__pb2.Message.SerializeToString, - response_deserializer=dummy__pb2.Message.FromString, + # missing associated documentation comment in .proto file + pass + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.dummyAPI = channel.unary_unary( + '/dummy.DummyGRPCService/dummyAPI', + request_serializer=dummy__pb2.Message.SerializeToString, + response_deserializer=dummy__pb2.Message.FromString, ) class DummyGRPCServiceServicer(object): - # missing associated documentation comment in .proto file - pass - - def dummyAPI(self, request, context): # missing associated documentation comment in .proto file pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + + def dummyAPI(self, request, context): + # missing associated documentation comment in .proto file + pass + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def add_DummyGRPCServiceServicer_to_server(servicer, server): - rpc_method_handlers = { - 'dummyAPI': grpc.unary_unary_rpc_method_handler( - servicer.dummyAPI, - request_deserializer=dummy__pb2.Message.FromString, - response_serializer=dummy__pb2.Message.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'dummy.DummyGRPCService', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) + rpc_method_handlers = { + 'dummyAPI': grpc.unary_unary_rpc_method_handler( + servicer.dummyAPI, + request_deserializer=dummy__pb2.Message.FromString, + response_serializer=dummy__pb2.Message.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'dummy.DummyGRPCService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) diff --git a/tests/yaml/inception-encoder.yml b/tests/yaml/inception-encoder.yml index a84f4e41..4978e0c8 100644 --- a/tests/yaml/inception-encoder.yml +++ b/tests/yaml/inception-encoder.yml @@ -1,4 +1,4 @@ -!BasePytorchEncoder +!TorchvisionEncoder parameters: model_dir: ${INCEPTION_MODEL} model_name: inception_v3 diff --git a/tests/yaml/mobilenet-encoder.yml b/tests/yaml/mobilenet-encoder.yml index 70a65158..a6b809a3 100644 --- a/tests/yaml/mobilenet-encoder.yml +++ b/tests/yaml/mobilenet-encoder.yml @@ -1,4 +1,4 @@ -!BasePytorchEncoder +!TorchvisionEncoder parameters: model_dir: ${MOBILENET_MODEL} model_name: mobilenet_v2 diff --git a/tests/yaml/preprocessor2.yml b/tests/yaml/preprocessor2.yml deleted file mode 100644 index c3a795cb..00000000 --- a/tests/yaml/preprocessor2.yml +++ /dev/null @@ -1,7 +0,0 @@ -!SlidingPreprocessor -parameters: - start_doc_id: 0 - random_doc_id: True - is_rgb: True -gnes_config: - is_trained: true \ No newline at end of file diff --git a/tests/yaml/resnet-encoder.yml b/tests/yaml/resnet-encoder.yml index 101700c0..201a1956 100644 --- a/tests/yaml/resnet-encoder.yml +++ b/tests/yaml/resnet-encoder.yml @@ -1,4 +1,4 @@ -!BasePytorchEncoder +!TorchvisionEncoder parameters: model_dir: ${RESNET_MODEL} model_name: resnet50 diff --git a/tests/yaml/vgg-encoder.yml b/tests/yaml/vgg-encoder.yml index e4f8404f..e91d7316 100644 --- a/tests/yaml/vgg-encoder.yml +++ b/tests/yaml/vgg-encoder.yml @@ -1,4 +1,4 @@ -!BasePytorchEncoder +!TorchvisionEncoder parameters: model_dir: ${VGG_MODEL} model_name: vgg16 diff --git a/tutorials/component-yaml-spec.md b/tutorials/component-yaml-spec.md index b6e656d4..255ac115 100644 --- a/tutorials/component-yaml-spec.md +++ b/tutorials/component-yaml-spec.md @@ -42,7 +42,7 @@ Preprocessor, encoder, indexer and router are fundamental components of GNES. Th Let's take a look an example: ```yaml -!BasePytorchEncoder +!TorchvisionEncoder parameters: model_dir: ${VGG_MODEL} model_name: vgg16 @@ -56,7 +56,7 @@ gnes_config: name: my-awesome-vgg ``` -In this example, we define a `BasePytorchEncoder` that loads a pretrained VGG16 model from the path`${VGG_MODEL}`. We then label this component as trained via `is_trained: true` and set its name to `my-awesome-vgg`. +In this example, we define a `TorchvisionEncoder` that loads a pretrained VGG16 model from the path`${VGG_MODEL}`. We then label this component as trained via `is_trained: true` and set its name to `my-awesome-vgg`. ## `!CLS` specification @@ -93,7 +93,7 @@ In this example, we define a `BasePytorchEncoder` that loads a pretrained VGG16 |`!CompositionalEncoder`|Encoder| |`!PipelineEncoder`|Encoder| |`!HashEncoder`|Encoder| -|`!BasePytorchEncoder`|Encoder| +|`!TorchvisionEncoder`|Encoder| |`!TFInceptionEncoder`|Encoder| |`!CVAEEncoder`|Encoder| |`!FaissIndexer`|Indexer| @@ -117,7 +117,7 @@ In this example, we define a `BasePytorchEncoder` that loads a pretrained VGG16 ## `parameters` specification -The key-value pair defined in `parameters` is basically a map of the arguments defined in the constructor of `!CLS`. Let's look at the signature of the constructor `BasePytorchEncoder` as an example: +The key-value pair defined in `parameters` is basically a map of the arguments defined in the constructor of `!CLS`. Let's look at the signature of the constructor `TorchvisionEncoder` as an example: @@ -138,7 +138,7 @@ def __init__(self, model_name: str,
-!BasePytorchEncoder
+!TorchvisionEncoder
 parameters:
   model_dir: ${VGG_MODEL}
   model_name: vgg16
@@ -268,7 +268,7 @@ To define a `PipelineEncoder`, you just need to sort the encoders in the right o
 ```yaml
 !PipelineEncoder
 components:
-  - !BasePytorchEncoder
+  - !TorchvisionEncoder
     parameters:
       model_dir: /ext_data/image_encoder
       model_name: resnet50
diff --git a/yaml-example/component/encoder.inception.yml b/yaml-example/component/encoder.inception.yml
index b7695b00..7c6f9184 100644
--- a/yaml-example/component/encoder.inception.yml
+++ b/yaml-example/component/encoder.inception.yml
@@ -1,6 +1,6 @@
 !PipelineEncoder
 components:
-  - !BasePytorchEncoder
+  - !TorchvisionEncoder
     parameters:
       model_dir: /ext_data/image_encoder
       model_name: inception_v3
diff --git a/yaml-example/component/encoder.resnet.yml b/yaml-example/component/encoder.resnet.yml
index 652837a5..10ecc2d4 100644
--- a/yaml-example/component/encoder.resnet.yml
+++ b/yaml-example/component/encoder.resnet.yml
@@ -1,6 +1,6 @@
 !PipelineEncoder
 components:
-  - !BasePytorchEncoder
+  - !TorchvisionEncoder
     parameters:
       model_dir: /ext_data/image_encoder
       model_name: resnet50
diff --git a/yaml-example/component/encoder.vgg.yml b/yaml-example/component/encoder.vgg.yml
index de61fd1f..9b760ea0 100644
--- a/yaml-example/component/encoder.vgg.yml
+++ b/yaml-example/component/encoder.vgg.yml
@@ -1,6 +1,6 @@
 !PipelineEncoder
 components:
-  - !BasePytorchEncoder
+  - !TorchvisionEncoder
     parameters:
       model_dir: /ext_data/image_encoder
       model_name: vgg16