diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a895e773..b085d741 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,9 @@ repos: rev: 5.12.0 hooks: - id: isort + exclude: (.*_pb2.py|.*_pb2_grpc.py) - repo: https://github.com/pycqa/flake8 rev: 6.0.0 hooks: - id: flake8 + exclude: (.*_pb2.py|.*_pb2_grpc.py) diff --git a/environment.yml b/environment.yml index 2a44f1aa..0244fe5e 100644 --- a/environment.yml +++ b/environment.yml @@ -8,7 +8,7 @@ dependencies: # - bioimage.core via submodule - python 3.9.* - numpy - - grpcio=1.41 + - grpcio=1.44 # protobuf 5 requires protoc version > 3.19.0 that requires grpcio >= 1.44 - marshmallow-union - marshmallow=3.12.* - marshmallow-jsonschema diff --git a/tiktorch/proto/data_store_pb2.py b/tiktorch/proto/data_store_pb2.py index cd582632..26ac233f 100644 --- a/tiktorch/proto/data_store_pb2.py +++ b/tiktorch/proto/data_store_pb2.py @@ -3,6 +3,7 @@ # source: data_store.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database @@ -13,210 +14,15 @@ -DESCRIPTOR = _descriptor.FileDescriptor( - name='data_store.proto', - package='', - syntax='proto3', - serialized_options=None, - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x10\x64\x61ta_store.proto\":\n\x0eUploadResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\r\x12\x0e\n\x06sha256\x18\x03 \x01(\t\"\x1a\n\nUploadInfo\x12\x0c\n\x04size\x18\x01 \x01(\r\"J\n\rUploadRequest\x12\x1b\n\x04info\x18\x01 \x01(\x0b\x32\x0b.UploadInfoH\x00\x12\x11\n\x07\x63ontent\x18\x02 \x01(\x0cH\x00\x42\t\n\x07payload\"!\n\rRemoveRequest\x12\x10\n\x08uploadId\x18\x01 \x01(\t\"\x10\n\x0eRemoveResponse2g\n\tDataStore\x12-\n\x06Upload\x12\x0e.UploadRequest\x1a\x0f.UploadResponse\"\x00(\x01\x12+\n\x06Remove\x12\x0e.RemoveRequest\x1a\x0f.RemoveResponse\"\x00\x62\x06proto3' -) +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10\x64\x61ta_store.proto\":\n\x0eUploadResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\r\x12\x0e\n\x06sha256\x18\x03 \x01(\t\"\x1a\n\nUploadInfo\x12\x0c\n\x04size\x18\x01 \x01(\r\"J\n\rUploadRequest\x12\x1b\n\x04info\x18\x01 \x01(\x0b\x32\x0b.UploadInfoH\x00\x12\x11\n\x07\x63ontent\x18\x02 \x01(\x0cH\x00\x42\t\n\x07payload\"!\n\rRemoveRequest\x12\x10\n\x08uploadId\x18\x01 \x01(\t\"\x10\n\x0eRemoveResponse2g\n\tDataStore\x12-\n\x06Upload\x12\x0e.UploadRequest\x1a\x0f.UploadResponse\"\x00(\x01\x12+\n\x06Remove\x12\x0e.RemoveRequest\x1a\x0f.RemoveResponse\"\x00\x62\x06proto3') - -_UPLOADRESPONSE = _descriptor.Descriptor( - name='UploadResponse', - full_name='UploadResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='id', full_name='UploadResponse.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, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='size', full_name='UploadResponse.size', index=1, - number=2, 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, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='sha256', full_name='UploadResponse.sha256', index=2, - number=3, 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, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=20, - serialized_end=78, -) - - -_UPLOADINFO = _descriptor.Descriptor( - name='UploadInfo', - full_name='UploadInfo', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='size', full_name='UploadInfo.size', index=0, - number=1, 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, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=80, - serialized_end=106, -) - - -_UPLOADREQUEST = _descriptor.Descriptor( - name='UploadRequest', - full_name='UploadRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='info', full_name='UploadRequest.info', 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, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='content', full_name='UploadRequest.content', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=b"", - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='payload', full_name='UploadRequest.payload', - index=0, containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[]), - ], - serialized_start=108, - serialized_end=182, -) - - -_REMOVEREQUEST = _descriptor.Descriptor( - name='RemoveRequest', - full_name='RemoveRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='uploadId', full_name='RemoveRequest.uploadId', 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, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=184, - serialized_end=217, -) - - -_REMOVERESPONSE = _descriptor.Descriptor( - name='RemoveResponse', - full_name='RemoveResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=219, - serialized_end=235, -) - -_UPLOADREQUEST.fields_by_name['info'].message_type = _UPLOADINFO -_UPLOADREQUEST.oneofs_by_name['payload'].fields.append( - _UPLOADREQUEST.fields_by_name['info']) -_UPLOADREQUEST.fields_by_name['info'].containing_oneof = _UPLOADREQUEST.oneofs_by_name['payload'] -_UPLOADREQUEST.oneofs_by_name['payload'].fields.append( - _UPLOADREQUEST.fields_by_name['content']) -_UPLOADREQUEST.fields_by_name['content'].containing_oneof = _UPLOADREQUEST.oneofs_by_name['payload'] -DESCRIPTOR.message_types_by_name['UploadResponse'] = _UPLOADRESPONSE -DESCRIPTOR.message_types_by_name['UploadInfo'] = _UPLOADINFO -DESCRIPTOR.message_types_by_name['UploadRequest'] = _UPLOADREQUEST -DESCRIPTOR.message_types_by_name['RemoveRequest'] = _REMOVEREQUEST -DESCRIPTOR.message_types_by_name['RemoveResponse'] = _REMOVERESPONSE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - +_UPLOADRESPONSE = DESCRIPTOR.message_types_by_name['UploadResponse'] +_UPLOADINFO = DESCRIPTOR.message_types_by_name['UploadInfo'] +_UPLOADREQUEST = DESCRIPTOR.message_types_by_name['UploadRequest'] +_REMOVEREQUEST = DESCRIPTOR.message_types_by_name['RemoveRequest'] +_REMOVERESPONSE = DESCRIPTOR.message_types_by_name['RemoveResponse'] UploadResponse = _reflection.GeneratedProtocolMessageType('UploadResponse', (_message.Message,), { 'DESCRIPTOR' : _UPLOADRESPONSE, '__module__' : 'data_store_pb2' @@ -252,41 +58,20 @@ }) _sym_db.RegisterMessage(RemoveResponse) - - -_DATASTORE = _descriptor.ServiceDescriptor( - name='DataStore', - full_name='DataStore', - file=DESCRIPTOR, - index=0, - serialized_options=None, - create_key=_descriptor._internal_create_key, - serialized_start=237, - serialized_end=340, - methods=[ - _descriptor.MethodDescriptor( - name='Upload', - full_name='DataStore.Upload', - index=0, - containing_service=None, - input_type=_UPLOADREQUEST, - output_type=_UPLOADRESPONSE, - serialized_options=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='Remove', - full_name='DataStore.Remove', - index=1, - containing_service=None, - input_type=_REMOVEREQUEST, - output_type=_REMOVERESPONSE, - serialized_options=None, - create_key=_descriptor._internal_create_key, - ), -]) -_sym_db.RegisterServiceDescriptor(_DATASTORE) - -DESCRIPTOR.services_by_name['DataStore'] = _DATASTORE - +_DATASTORE = DESCRIPTOR.services_by_name['DataStore'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _UPLOADRESPONSE._serialized_start=20 + _UPLOADRESPONSE._serialized_end=78 + _UPLOADINFO._serialized_start=80 + _UPLOADINFO._serialized_end=106 + _UPLOADREQUEST._serialized_start=108 + _UPLOADREQUEST._serialized_end=182 + _REMOVEREQUEST._serialized_start=184 + _REMOVEREQUEST._serialized_end=217 + _REMOVERESPONSE._serialized_start=219 + _REMOVERESPONSE._serialized_end=235 + _DATASTORE._serialized_start=237 + _DATASTORE._serialized_end=340 # @@protoc_insertion_point(module_scope) diff --git a/tiktorch/proto/inference_pb2.py b/tiktorch/proto/inference_pb2.py index dc5c6c9c..9a8cd5f7 100644 --- a/tiktorch/proto/inference_pb2.py +++ b/tiktorch/proto/inference_pb2.py @@ -3,10 +3,10 @@ # source: inference.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool 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() @@ -14,1002 +14,34 @@ -DESCRIPTOR = _descriptor.FileDescriptor( - name='inference.proto', - package='', - syntax='proto3', - serialized_options=None, - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x0finference.proto\"Y\n\x06\x44\x65vice\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1e\n\x06status\x18\x02 \x01(\x0e\x32\x0e.Device.Status\"#\n\x06Status\x12\r\n\tAVAILABLE\x10\x00\x12\n\n\x06IN_USE\x10\x01\"W\n\x1f\x43reateDatasetDescriptionRequest\x12\x16\n\x0emodelSessionId\x18\x01 \x01(\t\x12\x0c\n\x04mean\x18\x03 \x01(\x01\x12\x0e\n\x06stddev\x18\x04 \x01(\x01\" \n\x12\x44\x61tasetDescription\x12\n\n\x02id\x18\x01 \x01(\t\"\'\n\x04\x42lob\x12\x0e\n\x06\x66ormat\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x0c\"i\n\x19\x43reateModelSessionRequest\x12\x13\n\tmodel_uri\x18\x01 \x01(\tH\x00\x12\x1b\n\nmodel_blob\x18\x02 \x01(\x0b\x32\x05.BlobH\x00\x12\x11\n\tdeviceIds\x18\x05 \x03(\tB\x07\n\x05model\")\n\tNamedInts\x12\x1c\n\tnamedInts\x18\x01 \x03(\x0b\x32\t.NamedInt\"/\n\x0bNamedFloats\x12 \n\x0bnamedFloats\x18\x01 \x03(\x0b\x32\x0b.NamedFloat\"\x9d\x01\n\nInputShape\x12(\n\tshapeType\x18\x01 \x01(\x0e\x32\x15.InputShape.ShapeType\x12\x19\n\x05shape\x18\x02 \x01(\x0b\x32\n.NamedInts\x12\x1d\n\tstepShape\x18\x04 \x01(\x0b\x32\n.NamedInts\"+\n\tShapeType\x12\x0c\n\x08\x45XPLICIT\x10\x00\x12\x10\n\x0cPARAMETRIZED\x10\x01\"\xea\x01\n\x0bOutputShape\x12)\n\tshapeType\x18\x01 \x01(\x0e\x32\x16.OutputShape.ShapeType\x12\x19\n\x05shape\x18\x02 \x01(\x0b\x32\n.NamedInts\x12\x18\n\x04halo\x18\x03 \x01(\x0b\x32\n.NamedInts\x12\x17\n\x0freferenceTensor\x18\x04 \x01(\t\x12\x1b\n\x05scale\x18\x05 \x01(\x0b\x32\x0c.NamedFloats\x12\x1c\n\x06offset\x18\x06 \x01(\x0b\x32\x0c.NamedFloats\"\'\n\tShapeType\x12\x0c\n\x08\x45XPLICIT\x10\x00\x12\x0c\n\x08IMPLICIT\x10\x01\"\x1a\n\x0cModelSession\x12\n\n\x02id\x18\x01 \x01(\t\"\x9e\x01\n\x08LogEntry\x12\x11\n\ttimestamp\x18\x01 \x01(\r\x12\x1e\n\x05level\x18\x02 \x01(\x0e\x32\x0f.LogEntry.Level\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\t\"N\n\x05Level\x12\n\n\x06NOTSET\x10\x00\x12\t\n\x05\x44\x45\x42UG\x10\x01\x12\x08\n\x04INFO\x10\x02\x12\x0b\n\x07WARNING\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x12\x0c\n\x08\x43RITICAL\x10\x05\"#\n\x07\x44\x65vices\x12\x18\n\x07\x64\x65vices\x18\x01 \x03(\x0b\x32\x07.Device\"&\n\x08NamedInt\x12\x0c\n\x04size\x18\x01 \x01(\r\x12\x0c\n\x04name\x18\x02 \x01(\t\"(\n\nNamedFloat\x12\x0c\n\x04size\x18\x01 \x01(\x02\x12\x0c\n\x04name\x18\x02 \x01(\t\"S\n\x06Tensor\x12\x0e\n\x06\x62uffer\x18\x01 \x01(\x0c\x12\r\n\x05\x64type\x18\x02 \x01(\t\x12\x10\n\x08tensorId\x18\x03 \x01(\t\x12\x18\n\x05shape\x18\x04 \x03(\x0b\x32\t.NamedInt\"U\n\x0ePredictRequest\x12\x16\n\x0emodelSessionId\x18\x01 \x01(\t\x12\x11\n\tdatasetId\x18\x02 \x01(\t\x12\x18\n\x07tensors\x18\x03 \x03(\x0b\x32\x07.Tensor\"+\n\x0fPredictResponse\x12\x18\n\x07tensors\x18\x01 \x03(\x0b\x32\x07.Tensor\"\x07\n\x05\x45mpty\"\x1e\n\tModelInfo\x12\x11\n\tdeviceIds\x18\x01 \x03(\t\"^\n CreateModelSessionChunkedRequest\x12\x1a\n\x04info\x18\x01 \x01(\x0b\x32\n.ModelInfoH\x00\x12\x16\n\x05\x63hunk\x18\x02 \x01(\x0b\x32\x05.BlobH\x00\x42\x06\n\x04\x64\x61ta2\xc6\x02\n\tInference\x12\x41\n\x12\x43reateModelSession\x12\x1a.CreateModelSessionRequest\x1a\r.ModelSession\"\x00\x12,\n\x11\x43loseModelSession\x12\r.ModelSession\x1a\x06.Empty\"\x00\x12S\n\x18\x43reateDatasetDescription\x12 .CreateDatasetDescriptionRequest\x1a\x13.DatasetDescription\"\x00\x12 \n\x07GetLogs\x12\x06.Empty\x1a\t.LogEntry\"\x00\x30\x01\x12!\n\x0bListDevices\x12\x06.Empty\x1a\x08.Devices\"\x00\x12.\n\x07Predict\x12\x0f.PredictRequest\x1a\x10.PredictResponse\"\x00\x32G\n\rFlightControl\x12\x18\n\x04Ping\x12\x06.Empty\x1a\x06.Empty\"\x00\x12\x1c\n\x08Shutdown\x12\x06.Empty\x1a\x06.Empty\"\x00\x62\x06proto3' -) - - - -_DEVICE_STATUS = _descriptor.EnumDescriptor( - name='Status', - full_name='Device.Status', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='AVAILABLE', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='IN_USE', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=73, - serialized_end=108, -) -_sym_db.RegisterEnumDescriptor(_DEVICE_STATUS) - -_INPUTSHAPE_SHAPETYPE = _descriptor.EnumDescriptor( - name='ShapeType', - full_name='InputShape.ShapeType', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='EXPLICIT', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='PARAMETRIZED', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=588, - serialized_end=631, -) -_sym_db.RegisterEnumDescriptor(_INPUTSHAPE_SHAPETYPE) - -_OUTPUTSHAPE_SHAPETYPE = _descriptor.EnumDescriptor( - name='ShapeType', - full_name='OutputShape.ShapeType', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='EXPLICIT', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='IMPLICIT', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=829, - serialized_end=868, -) -_sym_db.RegisterEnumDescriptor(_OUTPUTSHAPE_SHAPETYPE) - -_LOGENTRY_LEVEL = _descriptor.EnumDescriptor( - name='Level', - full_name='LogEntry.Level', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='NOTSET', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='DEBUG', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='INFO', index=2, number=2, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='WARNING', index=3, number=3, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='ERROR', index=4, number=4, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='CRITICAL', index=5, number=5, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=979, - serialized_end=1057, -) -_sym_db.RegisterEnumDescriptor(_LOGENTRY_LEVEL) - - -_DEVICE = _descriptor.Descriptor( - name='Device', - full_name='Device', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='id', full_name='Device.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, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='status', full_name='Device.status', index=1, - number=2, type=14, cpp_type=8, 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, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _DEVICE_STATUS, - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=19, - serialized_end=108, -) - - -_CREATEDATASETDESCRIPTIONREQUEST = _descriptor.Descriptor( - name='CreateDatasetDescriptionRequest', - full_name='CreateDatasetDescriptionRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='modelSessionId', full_name='CreateDatasetDescriptionRequest.modelSessionId', 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, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='mean', full_name='CreateDatasetDescriptionRequest.mean', index=1, - number=3, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='stddev', full_name='CreateDatasetDescriptionRequest.stddev', index=2, - number=4, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=110, - serialized_end=197, -) - - -_DATASETDESCRIPTION = _descriptor.Descriptor( - name='DatasetDescription', - full_name='DatasetDescription', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='id', full_name='DatasetDescription.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, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=199, - serialized_end=231, -) - - -_BLOB = _descriptor.Descriptor( - name='Blob', - full_name='Blob', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='format', full_name='Blob.format', 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, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='content', full_name='Blob.content', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=b"", - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=233, - serialized_end=272, -) - - -_CREATEMODELSESSIONREQUEST = _descriptor.Descriptor( - name='CreateModelSessionRequest', - full_name='CreateModelSessionRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='model_uri', full_name='CreateModelSessionRequest.model_uri', 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, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='model_blob', full_name='CreateModelSessionRequest.model_blob', 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, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='deviceIds', full_name='CreateModelSessionRequest.deviceIds', index=2, - number=5, type=9, cpp_type=9, 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, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='model', full_name='CreateModelSessionRequest.model', - index=0, containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[]), - ], - serialized_start=274, - serialized_end=379, -) - - -_NAMEDINTS = _descriptor.Descriptor( - name='NamedInts', - full_name='NamedInts', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='namedInts', full_name='NamedInts.namedInts', index=0, - number=1, 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, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=381, - serialized_end=422, -) - - -_NAMEDFLOATS = _descriptor.Descriptor( - name='NamedFloats', - full_name='NamedFloats', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='namedFloats', full_name='NamedFloats.namedFloats', index=0, - number=1, 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, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=424, - serialized_end=471, -) - - -_INPUTSHAPE = _descriptor.Descriptor( - name='InputShape', - full_name='InputShape', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='shapeType', full_name='InputShape.shapeType', index=0, - number=1, type=14, cpp_type=8, 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, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='shape', full_name='InputShape.shape', 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, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='stepShape', full_name='InputShape.stepShape', index=2, - number=4, 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, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _INPUTSHAPE_SHAPETYPE, - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=474, - serialized_end=631, -) - - -_OUTPUTSHAPE = _descriptor.Descriptor( - name='OutputShape', - full_name='OutputShape', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='shapeType', full_name='OutputShape.shapeType', index=0, - number=1, type=14, cpp_type=8, 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, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='shape', full_name='OutputShape.shape', 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, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='halo', full_name='OutputShape.halo', index=2, - number=3, 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, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='referenceTensor', full_name='OutputShape.referenceTensor', index=3, - number=4, 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, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='scale', full_name='OutputShape.scale', index=4, - number=5, 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, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='offset', full_name='OutputShape.offset', index=5, - number=6, 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, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _OUTPUTSHAPE_SHAPETYPE, - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=634, - serialized_end=868, -) - - -_MODELSESSION = _descriptor.Descriptor( - name='ModelSession', - full_name='ModelSession', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='id', full_name='ModelSession.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, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=870, - serialized_end=896, -) - - -_LOGENTRY = _descriptor.Descriptor( - name='LogEntry', - full_name='LogEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='timestamp', full_name='LogEntry.timestamp', index=0, - number=1, 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, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='level', full_name='LogEntry.level', index=1, - number=2, type=14, cpp_type=8, 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, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='content', full_name='LogEntry.content', index=2, - number=3, 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, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _LOGENTRY_LEVEL, - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=899, - serialized_end=1057, -) - - -_DEVICES = _descriptor.Descriptor( - name='Devices', - full_name='Devices', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='devices', full_name='Devices.devices', index=0, - number=1, 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, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1059, - serialized_end=1094, -) - - -_NAMEDINT = _descriptor.Descriptor( - name='NamedInt', - full_name='NamedInt', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='size', full_name='NamedInt.size', index=0, - number=1, 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, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='name', full_name='NamedInt.name', 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, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1096, - serialized_end=1134, -) - - -_NAMEDFLOAT = _descriptor.Descriptor( - name='NamedFloat', - full_name='NamedFloat', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='size', full_name='NamedFloat.size', index=0, - number=1, type=2, cpp_type=6, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='name', full_name='NamedFloat.name', 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, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1136, - serialized_end=1176, -) - - -_TENSOR = _descriptor.Descriptor( - name='Tensor', - full_name='Tensor', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='buffer', full_name='Tensor.buffer', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=b"", - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='dtype', full_name='Tensor.dtype', 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, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='tensorId', full_name='Tensor.tensorId', index=2, - number=3, 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, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='shape', full_name='Tensor.shape', index=3, - number=4, 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, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1178, - serialized_end=1261, -) - - -_PREDICTREQUEST = _descriptor.Descriptor( - name='PredictRequest', - full_name='PredictRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='modelSessionId', full_name='PredictRequest.modelSessionId', 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, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='datasetId', full_name='PredictRequest.datasetId', 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, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='tensors', full_name='PredictRequest.tensors', index=2, - number=3, 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, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1263, - serialized_end=1348, -) - - -_PREDICTRESPONSE = _descriptor.Descriptor( - name='PredictResponse', - full_name='PredictResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='tensors', full_name='PredictResponse.tensors', index=0, - number=1, 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, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1350, - serialized_end=1393, -) - - -_EMPTY = _descriptor.Descriptor( - name='Empty', - full_name='Empty', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1395, - serialized_end=1402, -) - - -_MODELINFO = _descriptor.Descriptor( - name='ModelInfo', - full_name='ModelInfo', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='deviceIds', full_name='ModelInfo.deviceIds', index=0, - number=1, type=9, cpp_type=9, 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, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1404, - serialized_end=1434, -) - - -_CREATEMODELSESSIONCHUNKEDREQUEST = _descriptor.Descriptor( - name='CreateModelSessionChunkedRequest', - full_name='CreateModelSessionChunkedRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='info', full_name='CreateModelSessionChunkedRequest.info', 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, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='chunk', full_name='CreateModelSessionChunkedRequest.chunk', 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, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='data', full_name='CreateModelSessionChunkedRequest.data', - index=0, containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[]), - ], - serialized_start=1436, - serialized_end=1530, -) - -_DEVICE.fields_by_name['status'].enum_type = _DEVICE_STATUS -_DEVICE_STATUS.containing_type = _DEVICE -_CREATEMODELSESSIONREQUEST.fields_by_name['model_blob'].message_type = _BLOB -_CREATEMODELSESSIONREQUEST.oneofs_by_name['model'].fields.append( - _CREATEMODELSESSIONREQUEST.fields_by_name['model_uri']) -_CREATEMODELSESSIONREQUEST.fields_by_name['model_uri'].containing_oneof = _CREATEMODELSESSIONREQUEST.oneofs_by_name['model'] -_CREATEMODELSESSIONREQUEST.oneofs_by_name['model'].fields.append( - _CREATEMODELSESSIONREQUEST.fields_by_name['model_blob']) -_CREATEMODELSESSIONREQUEST.fields_by_name['model_blob'].containing_oneof = _CREATEMODELSESSIONREQUEST.oneofs_by_name['model'] -_NAMEDINTS.fields_by_name['namedInts'].message_type = _NAMEDINT -_NAMEDFLOATS.fields_by_name['namedFloats'].message_type = _NAMEDFLOAT -_INPUTSHAPE.fields_by_name['shapeType'].enum_type = _INPUTSHAPE_SHAPETYPE -_INPUTSHAPE.fields_by_name['shape'].message_type = _NAMEDINTS -_INPUTSHAPE.fields_by_name['stepShape'].message_type = _NAMEDINTS -_INPUTSHAPE_SHAPETYPE.containing_type = _INPUTSHAPE -_OUTPUTSHAPE.fields_by_name['shapeType'].enum_type = _OUTPUTSHAPE_SHAPETYPE -_OUTPUTSHAPE.fields_by_name['shape'].message_type = _NAMEDINTS -_OUTPUTSHAPE.fields_by_name['halo'].message_type = _NAMEDINTS -_OUTPUTSHAPE.fields_by_name['scale'].message_type = _NAMEDFLOATS -_OUTPUTSHAPE.fields_by_name['offset'].message_type = _NAMEDFLOATS -_OUTPUTSHAPE_SHAPETYPE.containing_type = _OUTPUTSHAPE -_LOGENTRY.fields_by_name['level'].enum_type = _LOGENTRY_LEVEL -_LOGENTRY_LEVEL.containing_type = _LOGENTRY -_DEVICES.fields_by_name['devices'].message_type = _DEVICE -_TENSOR.fields_by_name['shape'].message_type = _NAMEDINT -_PREDICTREQUEST.fields_by_name['tensors'].message_type = _TENSOR -_PREDICTRESPONSE.fields_by_name['tensors'].message_type = _TENSOR -_CREATEMODELSESSIONCHUNKEDREQUEST.fields_by_name['info'].message_type = _MODELINFO -_CREATEMODELSESSIONCHUNKEDREQUEST.fields_by_name['chunk'].message_type = _BLOB -_CREATEMODELSESSIONCHUNKEDREQUEST.oneofs_by_name['data'].fields.append( - _CREATEMODELSESSIONCHUNKEDREQUEST.fields_by_name['info']) -_CREATEMODELSESSIONCHUNKEDREQUEST.fields_by_name['info'].containing_oneof = _CREATEMODELSESSIONCHUNKEDREQUEST.oneofs_by_name['data'] -_CREATEMODELSESSIONCHUNKEDREQUEST.oneofs_by_name['data'].fields.append( - _CREATEMODELSESSIONCHUNKEDREQUEST.fields_by_name['chunk']) -_CREATEMODELSESSIONCHUNKEDREQUEST.fields_by_name['chunk'].containing_oneof = _CREATEMODELSESSIONCHUNKEDREQUEST.oneofs_by_name['data'] -DESCRIPTOR.message_types_by_name['Device'] = _DEVICE -DESCRIPTOR.message_types_by_name['CreateDatasetDescriptionRequest'] = _CREATEDATASETDESCRIPTIONREQUEST -DESCRIPTOR.message_types_by_name['DatasetDescription'] = _DATASETDESCRIPTION -DESCRIPTOR.message_types_by_name['Blob'] = _BLOB -DESCRIPTOR.message_types_by_name['CreateModelSessionRequest'] = _CREATEMODELSESSIONREQUEST -DESCRIPTOR.message_types_by_name['NamedInts'] = _NAMEDINTS -DESCRIPTOR.message_types_by_name['NamedFloats'] = _NAMEDFLOATS -DESCRIPTOR.message_types_by_name['InputShape'] = _INPUTSHAPE -DESCRIPTOR.message_types_by_name['OutputShape'] = _OUTPUTSHAPE -DESCRIPTOR.message_types_by_name['ModelSession'] = _MODELSESSION -DESCRIPTOR.message_types_by_name['LogEntry'] = _LOGENTRY -DESCRIPTOR.message_types_by_name['Devices'] = _DEVICES -DESCRIPTOR.message_types_by_name['NamedInt'] = _NAMEDINT -DESCRIPTOR.message_types_by_name['NamedFloat'] = _NAMEDFLOAT -DESCRIPTOR.message_types_by_name['Tensor'] = _TENSOR -DESCRIPTOR.message_types_by_name['PredictRequest'] = _PREDICTREQUEST -DESCRIPTOR.message_types_by_name['PredictResponse'] = _PREDICTRESPONSE -DESCRIPTOR.message_types_by_name['Empty'] = _EMPTY -DESCRIPTOR.message_types_by_name['ModelInfo'] = _MODELINFO -DESCRIPTOR.message_types_by_name['CreateModelSessionChunkedRequest'] = _CREATEMODELSESSIONCHUNKEDREQUEST -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0finference.proto\"Y\n\x06\x44\x65vice\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1e\n\x06status\x18\x02 \x01(\x0e\x32\x0e.Device.Status\"#\n\x06Status\x12\r\n\tAVAILABLE\x10\x00\x12\n\n\x06IN_USE\x10\x01\"W\n\x1f\x43reateDatasetDescriptionRequest\x12\x16\n\x0emodelSessionId\x18\x01 \x01(\t\x12\x0c\n\x04mean\x18\x03 \x01(\x01\x12\x0e\n\x06stddev\x18\x04 \x01(\x01\" \n\x12\x44\x61tasetDescription\x12\n\n\x02id\x18\x01 \x01(\t\"\'\n\x04\x42lob\x12\x0e\n\x06\x66ormat\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x0c\"i\n\x19\x43reateModelSessionRequest\x12\x13\n\tmodel_uri\x18\x01 \x01(\tH\x00\x12\x1b\n\nmodel_blob\x18\x02 \x01(\x0b\x32\x05.BlobH\x00\x12\x11\n\tdeviceIds\x18\x05 \x03(\tB\x07\n\x05model\")\n\tNamedInts\x12\x1c\n\tnamedInts\x18\x01 \x03(\x0b\x32\t.NamedInt\"/\n\x0bNamedFloats\x12 \n\x0bnamedFloats\x18\x01 \x03(\x0b\x32\x0b.NamedFloat\"\x9d\x01\n\nInputShape\x12(\n\tshapeType\x18\x01 \x01(\x0e\x32\x15.InputShape.ShapeType\x12\x19\n\x05shape\x18\x02 \x01(\x0b\x32\n.NamedInts\x12\x1d\n\tstepShape\x18\x04 \x01(\x0b\x32\n.NamedInts\"+\n\tShapeType\x12\x0c\n\x08\x45XPLICIT\x10\x00\x12\x10\n\x0cPARAMETRIZED\x10\x01\"\xea\x01\n\x0bOutputShape\x12)\n\tshapeType\x18\x01 \x01(\x0e\x32\x16.OutputShape.ShapeType\x12\x19\n\x05shape\x18\x02 \x01(\x0b\x32\n.NamedInts\x12\x18\n\x04halo\x18\x03 \x01(\x0b\x32\n.NamedInts\x12\x17\n\x0freferenceTensor\x18\x04 \x01(\t\x12\x1b\n\x05scale\x18\x05 \x01(\x0b\x32\x0c.NamedFloats\x12\x1c\n\x06offset\x18\x06 \x01(\x0b\x32\x0c.NamedFloats\"\'\n\tShapeType\x12\x0c\n\x08\x45XPLICIT\x10\x00\x12\x0c\n\x08IMPLICIT\x10\x01\"\x1a\n\x0cModelSession\x12\n\n\x02id\x18\x01 \x01(\t\"\x9e\x01\n\x08LogEntry\x12\x11\n\ttimestamp\x18\x01 \x01(\r\x12\x1e\n\x05level\x18\x02 \x01(\x0e\x32\x0f.LogEntry.Level\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\t\"N\n\x05Level\x12\n\n\x06NOTSET\x10\x00\x12\t\n\x05\x44\x45\x42UG\x10\x01\x12\x08\n\x04INFO\x10\x02\x12\x0b\n\x07WARNING\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x12\x0c\n\x08\x43RITICAL\x10\x05\"#\n\x07\x44\x65vices\x12\x18\n\x07\x64\x65vices\x18\x01 \x03(\x0b\x32\x07.Device\"&\n\x08NamedInt\x12\x0c\n\x04size\x18\x01 \x01(\r\x12\x0c\n\x04name\x18\x02 \x01(\t\"(\n\nNamedFloat\x12\x0c\n\x04size\x18\x01 \x01(\x02\x12\x0c\n\x04name\x18\x02 \x01(\t\"S\n\x06Tensor\x12\x0e\n\x06\x62uffer\x18\x01 \x01(\x0c\x12\r\n\x05\x64type\x18\x02 \x01(\t\x12\x10\n\x08tensorId\x18\x03 \x01(\t\x12\x18\n\x05shape\x18\x04 \x03(\x0b\x32\t.NamedInt\"U\n\x0ePredictRequest\x12\x16\n\x0emodelSessionId\x18\x01 \x01(\t\x12\x11\n\tdatasetId\x18\x02 \x01(\t\x12\x18\n\x07tensors\x18\x03 \x03(\x0b\x32\x07.Tensor\"+\n\x0fPredictResponse\x12\x18\n\x07tensors\x18\x01 \x03(\x0b\x32\x07.Tensor\"\x07\n\x05\x45mpty\"\x1e\n\tModelInfo\x12\x11\n\tdeviceIds\x18\x01 \x03(\t\"^\n CreateModelSessionChunkedRequest\x12\x1a\n\x04info\x18\x01 \x01(\x0b\x32\n.ModelInfoH\x00\x12\x16\n\x05\x63hunk\x18\x02 \x01(\x0b\x32\x05.BlobH\x00\x42\x06\n\x04\x64\x61ta2\xc6\x02\n\tInference\x12\x41\n\x12\x43reateModelSession\x12\x1a.CreateModelSessionRequest\x1a\r.ModelSession\"\x00\x12,\n\x11\x43loseModelSession\x12\r.ModelSession\x1a\x06.Empty\"\x00\x12S\n\x18\x43reateDatasetDescription\x12 .CreateDatasetDescriptionRequest\x1a\x13.DatasetDescription\"\x00\x12 \n\x07GetLogs\x12\x06.Empty\x1a\t.LogEntry\"\x00\x30\x01\x12!\n\x0bListDevices\x12\x06.Empty\x1a\x08.Devices\"\x00\x12.\n\x07Predict\x12\x0f.PredictRequest\x1a\x10.PredictResponse\"\x00\x32G\n\rFlightControl\x12\x18\n\x04Ping\x12\x06.Empty\x1a\x06.Empty\"\x00\x12\x1c\n\x08Shutdown\x12\x06.Empty\x1a\x06.Empty\"\x00\x62\x06proto3') + + + +_DEVICE = DESCRIPTOR.message_types_by_name['Device'] +_CREATEDATASETDESCRIPTIONREQUEST = DESCRIPTOR.message_types_by_name['CreateDatasetDescriptionRequest'] +_DATASETDESCRIPTION = DESCRIPTOR.message_types_by_name['DatasetDescription'] +_BLOB = DESCRIPTOR.message_types_by_name['Blob'] +_CREATEMODELSESSIONREQUEST = DESCRIPTOR.message_types_by_name['CreateModelSessionRequest'] +_NAMEDINTS = DESCRIPTOR.message_types_by_name['NamedInts'] +_NAMEDFLOATS = DESCRIPTOR.message_types_by_name['NamedFloats'] +_INPUTSHAPE = DESCRIPTOR.message_types_by_name['InputShape'] +_OUTPUTSHAPE = DESCRIPTOR.message_types_by_name['OutputShape'] +_MODELSESSION = DESCRIPTOR.message_types_by_name['ModelSession'] +_LOGENTRY = DESCRIPTOR.message_types_by_name['LogEntry'] +_DEVICES = DESCRIPTOR.message_types_by_name['Devices'] +_NAMEDINT = DESCRIPTOR.message_types_by_name['NamedInt'] +_NAMEDFLOAT = DESCRIPTOR.message_types_by_name['NamedFloat'] +_TENSOR = DESCRIPTOR.message_types_by_name['Tensor'] +_PREDICTREQUEST = DESCRIPTOR.message_types_by_name['PredictRequest'] +_PREDICTRESPONSE = DESCRIPTOR.message_types_by_name['PredictResponse'] +_EMPTY = DESCRIPTOR.message_types_by_name['Empty'] +_MODELINFO = DESCRIPTOR.message_types_by_name['ModelInfo'] +_CREATEMODELSESSIONCHUNKEDREQUEST = DESCRIPTOR.message_types_by_name['CreateModelSessionChunkedRequest'] +_DEVICE_STATUS = _DEVICE.enum_types_by_name['Status'] +_INPUTSHAPE_SHAPETYPE = _INPUTSHAPE.enum_types_by_name['ShapeType'] +_OUTPUTSHAPE_SHAPETYPE = _OUTPUTSHAPE.enum_types_by_name['ShapeType'] +_LOGENTRY_LEVEL = _LOGENTRY.enum_types_by_name['Level'] Device = _reflection.GeneratedProtocolMessageType('Device', (_message.Message,), { 'DESCRIPTOR' : _DEVICE, '__module__' : 'inference_pb2' @@ -1150,117 +182,61 @@ }) _sym_db.RegisterMessage(CreateModelSessionChunkedRequest) - - -_INFERENCE = _descriptor.ServiceDescriptor( - name='Inference', - full_name='Inference', - file=DESCRIPTOR, - index=0, - serialized_options=None, - create_key=_descriptor._internal_create_key, - serialized_start=1533, - serialized_end=1859, - methods=[ - _descriptor.MethodDescriptor( - name='CreateModelSession', - full_name='Inference.CreateModelSession', - index=0, - containing_service=None, - input_type=_CREATEMODELSESSIONREQUEST, - output_type=_MODELSESSION, - serialized_options=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='CloseModelSession', - full_name='Inference.CloseModelSession', - index=1, - containing_service=None, - input_type=_MODELSESSION, - output_type=_EMPTY, - serialized_options=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='CreateDatasetDescription', - full_name='Inference.CreateDatasetDescription', - index=2, - containing_service=None, - input_type=_CREATEDATASETDESCRIPTIONREQUEST, - output_type=_DATASETDESCRIPTION, - serialized_options=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='GetLogs', - full_name='Inference.GetLogs', - index=3, - containing_service=None, - input_type=_EMPTY, - output_type=_LOGENTRY, - serialized_options=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='ListDevices', - full_name='Inference.ListDevices', - index=4, - containing_service=None, - input_type=_EMPTY, - output_type=_DEVICES, - serialized_options=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='Predict', - full_name='Inference.Predict', - index=5, - containing_service=None, - input_type=_PREDICTREQUEST, - output_type=_PREDICTRESPONSE, - serialized_options=None, - create_key=_descriptor._internal_create_key, - ), -]) -_sym_db.RegisterServiceDescriptor(_INFERENCE) - -DESCRIPTOR.services_by_name['Inference'] = _INFERENCE - - -_FLIGHTCONTROL = _descriptor.ServiceDescriptor( - name='FlightControl', - full_name='FlightControl', - file=DESCRIPTOR, - index=1, - serialized_options=None, - create_key=_descriptor._internal_create_key, - serialized_start=1861, - serialized_end=1932, - methods=[ - _descriptor.MethodDescriptor( - name='Ping', - full_name='FlightControl.Ping', - index=0, - containing_service=None, - input_type=_EMPTY, - output_type=_EMPTY, - serialized_options=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='Shutdown', - full_name='FlightControl.Shutdown', - index=1, - containing_service=None, - input_type=_EMPTY, - output_type=_EMPTY, - serialized_options=None, - create_key=_descriptor._internal_create_key, - ), -]) -_sym_db.RegisterServiceDescriptor(_FLIGHTCONTROL) - -DESCRIPTOR.services_by_name['FlightControl'] = _FLIGHTCONTROL - +_INFERENCE = DESCRIPTOR.services_by_name['Inference'] +_FLIGHTCONTROL = DESCRIPTOR.services_by_name['FlightControl'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _DEVICE._serialized_start=19 + _DEVICE._serialized_end=108 + _DEVICE_STATUS._serialized_start=73 + _DEVICE_STATUS._serialized_end=108 + _CREATEDATASETDESCRIPTIONREQUEST._serialized_start=110 + _CREATEDATASETDESCRIPTIONREQUEST._serialized_end=197 + _DATASETDESCRIPTION._serialized_start=199 + _DATASETDESCRIPTION._serialized_end=231 + _BLOB._serialized_start=233 + _BLOB._serialized_end=272 + _CREATEMODELSESSIONREQUEST._serialized_start=274 + _CREATEMODELSESSIONREQUEST._serialized_end=379 + _NAMEDINTS._serialized_start=381 + _NAMEDINTS._serialized_end=422 + _NAMEDFLOATS._serialized_start=424 + _NAMEDFLOATS._serialized_end=471 + _INPUTSHAPE._serialized_start=474 + _INPUTSHAPE._serialized_end=631 + _INPUTSHAPE_SHAPETYPE._serialized_start=588 + _INPUTSHAPE_SHAPETYPE._serialized_end=631 + _OUTPUTSHAPE._serialized_start=634 + _OUTPUTSHAPE._serialized_end=868 + _OUTPUTSHAPE_SHAPETYPE._serialized_start=829 + _OUTPUTSHAPE_SHAPETYPE._serialized_end=868 + _MODELSESSION._serialized_start=870 + _MODELSESSION._serialized_end=896 + _LOGENTRY._serialized_start=899 + _LOGENTRY._serialized_end=1057 + _LOGENTRY_LEVEL._serialized_start=979 + _LOGENTRY_LEVEL._serialized_end=1057 + _DEVICES._serialized_start=1059 + _DEVICES._serialized_end=1094 + _NAMEDINT._serialized_start=1096 + _NAMEDINT._serialized_end=1134 + _NAMEDFLOAT._serialized_start=1136 + _NAMEDFLOAT._serialized_end=1176 + _TENSOR._serialized_start=1178 + _TENSOR._serialized_end=1261 + _PREDICTREQUEST._serialized_start=1263 + _PREDICTREQUEST._serialized_end=1348 + _PREDICTRESPONSE._serialized_start=1350 + _PREDICTRESPONSE._serialized_end=1393 + _EMPTY._serialized_start=1395 + _EMPTY._serialized_end=1402 + _MODELINFO._serialized_start=1404 + _MODELINFO._serialized_end=1434 + _CREATEMODELSESSIONCHUNKEDREQUEST._serialized_start=1436 + _CREATEMODELSESSIONCHUNKEDREQUEST._serialized_end=1530 + _INFERENCE._serialized_start=1533 + _INFERENCE._serialized_end=1859 + _FLIGHTCONTROL._serialized_start=1861 + _FLIGHTCONTROL._serialized_end=1932 # @@protoc_insertion_point(module_scope)