diff --git a/README.md b/README.md index 5a1b732..f30cec8 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ Universal Prediction Interface (UPI) aims to standardize prediction interface wi ## Getting Started To get started, install following software: - +- Java +- [maven](https://maven.apache.org/install.html) ([brew](https://formulae.brew.sh/formula/maven)) - [buf](https://docs.buf.build/installation) - [Go 1.18 or above](https://go.dev/doc/install) - Go dependencies and protoc plugins diff --git a/buf.gen.yaml b/buf.gen.yaml index f33d1dd..5ef4ccb 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -19,13 +19,13 @@ plugins: out: gen/go/grpc opt: paths=import,module=github.com/caraml-dev/universal-prediction-interface/gen/go # Python code gen - - remote: buf.build/protocolbuffers/plugins/python:v3.19.1-1 + - plugin: buf.build/protocolbuffers/python:v24.4 out: gen/python/grpc - - remote: buf.build/grpc/plugins/python:v1.46.2-1 + - plugin: buf.build/grpc/python:v1.58.1 out: gen/python/grpc - - remote: buf.build/jeffsawatzky/plugins/mypy-protobuf:v3.2.0-1 + - plugin: buf.build/community/nipunn1313-mypy:v3.5.0 out: gen/python/grpc - - remote: buf.build/jeffsawatzky/plugins/mypy-grpc-protobuf:v3.2.0-1 + - plugin: buf.build/community/nipunn1313-mypy-grpc:v3.5.0 out: gen/python/grpc # Ruby code gen - plugin: buf.build/grpc/ruby @@ -33,7 +33,7 @@ plugins: - plugin: buf.build/protocolbuffers/ruby out: gen/ruby/grpc # Documentations - - remote: buf.build/grpc-ecosystem/plugins/openapiv2:v2.6.0-1 + - plugin: buf.build/grpc-ecosystem/openapiv2:v2.18.0 out: docs/openapiv2 - name: doc out: docs/api_html diff --git a/docs/openapiv2/caraml/upi/v1/header.swagger.json b/docs/openapiv2/caraml/upi/v1/header.swagger.json index e73e472..a4ffdac 100644 --- a/docs/openapiv2/caraml/upi/v1/header.swagger.json +++ b/docs/openapiv2/caraml/upi/v1/header.swagger.json @@ -34,6 +34,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } diff --git a/docs/openapiv2/caraml/upi/v1/observation_log.swagger.json b/docs/openapiv2/caraml/upi/v1/observation_log.swagger.json index 6b2cd39..3d6fc25 100644 --- a/docs/openapiv2/caraml/upi/v1/observation_log.swagger.json +++ b/docs/openapiv2/caraml/upi/v1/observation_log.swagger.json @@ -72,6 +72,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } @@ -95,6 +96,7 @@ "observations": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v1ObservationLog" }, "title": "List of observations per request" @@ -128,6 +130,7 @@ "observationValues": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v1Variable" }, "description": "The ground-truth value. It can be a double, string or integer type." @@ -135,6 +138,7 @@ "observationContext": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v1Variable" }, "description": "A set of key-value pairs to provide additional context for the observation." diff --git a/docs/openapiv2/caraml/upi/v1/prediction_log.swagger.json b/docs/openapiv2/caraml/upi/v1/prediction_log.swagger.json index 1132208..9783892 100644 --- a/docs/openapiv2/caraml/upi/v1/prediction_log.swagger.json +++ b/docs/openapiv2/caraml/upi/v1/prediction_log.swagger.json @@ -34,6 +34,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } diff --git a/docs/openapiv2/caraml/upi/v1/router_log.swagger.json b/docs/openapiv2/caraml/upi/v1/router_log.swagger.json index b43bdbb..b897710 100644 --- a/docs/openapiv2/caraml/upi/v1/router_log.swagger.json +++ b/docs/openapiv2/caraml/upi/v1/router_log.swagger.json @@ -34,6 +34,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } diff --git a/docs/openapiv2/caraml/upi/v1/table.swagger.json b/docs/openapiv2/caraml/upi/v1/table.swagger.json index 46337a0..9c88f03 100644 --- a/docs/openapiv2/caraml/upi/v1/table.swagger.json +++ b/docs/openapiv2/caraml/upi/v1/table.swagger.json @@ -34,6 +34,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } diff --git a/docs/openapiv2/caraml/upi/v1/type.swagger.json b/docs/openapiv2/caraml/upi/v1/type.swagger.json index 14c937b..2cfa4a8 100644 --- a/docs/openapiv2/caraml/upi/v1/type.swagger.json +++ b/docs/openapiv2/caraml/upi/v1/type.swagger.json @@ -34,6 +34,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } diff --git a/docs/openapiv2/caraml/upi/v1/upi.swagger.json b/docs/openapiv2/caraml/upi/v1/upi.swagger.json index 71b7527..e78045d 100644 --- a/docs/openapiv2/caraml/upi/v1/upi.swagger.json +++ b/docs/openapiv2/caraml/upi/v1/upi.swagger.json @@ -72,6 +72,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } @@ -156,6 +157,7 @@ "predictionContext": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v1Variable" }, "title": "Prediction context may contain additional data applicable to all prediction instances\nFor example it can be used to store information for traffic rules, experimentation\nor tracking purposes.\nEg. country_code, service_type, service_area_id" @@ -181,6 +183,7 @@ "predictionContext": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v1Variable" }, "title": "Extensible field to cover unforeseen requirements" @@ -215,6 +218,7 @@ "models": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v1ModelMetadata" }, "title": "List of model that produces the prediction \nThis field is repeated to cater for use case such as ensembling several model production results" @@ -239,6 +243,7 @@ "values": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/upiv1Value" }, "description": "List of values within a row. \nIt is table's creator responsibility to ensure that the number of entry \nvalues matches with the length of columns in the table." @@ -256,6 +261,7 @@ "columns": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v1Column" }, "description": "Columns stores schema informations of all columns in the table." @@ -263,6 +269,7 @@ "rows": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v1Row" }, "description": "Rows stores list of row values in the table." @@ -276,6 +283,7 @@ "tables": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v1Table" }, "description": "List of tables\nAll tables must have unique name.\nEach table doesn't need to have same number of row." @@ -283,6 +291,7 @@ "variables": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v1Variable" }, "title": "List of variables" diff --git a/docs/openapiv2/caraml/upi/v1/variable.swagger.json b/docs/openapiv2/caraml/upi/v1/variable.swagger.json index c1d6e34..195e239 100644 --- a/docs/openapiv2/caraml/upi/v1/variable.swagger.json +++ b/docs/openapiv2/caraml/upi/v1/variable.swagger.json @@ -34,6 +34,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } diff --git a/gen/python/grpc/caraml/upi/v1/header_pb2.py b/gen/python/grpc/caraml/upi/v1/header_pb2.py index 59b35a6..8cf2746 100644 --- a/gen/python/grpc/caraml/upi/v1/header_pb2.py +++ b/gen/python/grpc/caraml/upi/v1/header_pb2.py @@ -4,9 +4,8 @@ """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 +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -16,20 +15,12 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x63\x61raml/upi/v1/header.proto\x12\rcaraml.upi.v1\"0\n\x06Header\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05valueB\xc7\x01\n\x11\x63om.caraml.upi.v1B\x0bHeaderProtoP\x01ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\xa2\x02\x03\x43UX\xaa\x02\rCaraml.Upi.V1\xca\x02\rCaraml\\Upi\\V1\xe2\x02\x19\x43\x61raml\\Upi\\V1\\GPBMetadata\xea\x02\x0f\x43\x61raml::Upi::V1b\x06proto3') - - -_HEADER = DESCRIPTOR.message_types_by_name['Header'] -Header = _reflection.GeneratedProtocolMessageType('Header', (_message.Message,), { - 'DESCRIPTOR' : _HEADER, - '__module__' : 'caraml.upi.v1.header_pb2' - # @@protoc_insertion_point(class_scope:caraml.upi.v1.Header) - }) -_sym_db.RegisterMessage(Header) - +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'caraml.upi.v1.header_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\021com.caraml.upi.v1B\013HeaderProtoP\001ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\242\002\003CUX\252\002\rCaraml.Upi.V1\312\002\rCaraml\\Upi\\V1\342\002\031Caraml\\Upi\\V1\\GPBMetadata\352\002\017Caraml::Upi::V1' - _HEADER._serialized_start=45 - _HEADER._serialized_end=93 + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\021com.caraml.upi.v1B\013HeaderProtoP\001ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\242\002\003CUX\252\002\rCaraml.Upi.V1\312\002\rCaraml\\Upi\\V1\342\002\031Caraml\\Upi\\V1\\GPBMetadata\352\002\017Caraml::Upi::V1' + _globals['_HEADER']._serialized_start=45 + _globals['_HEADER']._serialized_end=93 # @@protoc_insertion_point(module_scope) diff --git a/gen/python/grpc/caraml/upi/v1/header_pb2.pyi b/gen/python/grpc/caraml/upi/v1/header_pb2.pyi index 7a18538..3554df3 100644 --- a/gen/python/grpc/caraml/upi/v1/header_pb2.pyi +++ b/gen/python/grpc/caraml/upi/v1/header_pb2.pyi @@ -5,21 +5,29 @@ isort:skip_file import builtins import google.protobuf.descriptor import google.protobuf.message -import typing -import typing_extensions +import sys + +if sys.version_info >= (3, 8): + import typing as typing_extensions +else: + import typing_extensions DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing_extensions.final class Header(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + KEY_FIELD_NUMBER: builtins.int VALUE_FIELD_NUMBER: builtins.int - key: typing.Text - value: typing.Text - def __init__(self, + key: builtins.str + value: builtins.str + def __init__( + self, *, - key: typing.Text = ..., - value: typing.Text = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ... + key: builtins.str = ..., + value: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ... + global___Header = Header diff --git a/gen/python/grpc/caraml/upi/v1/header_pb2_grpc.pyi b/gen/python/grpc/caraml/upi/v1/header_pb2_grpc.pyi index f3a5a08..b13382f 100644 --- a/gen/python/grpc/caraml/upi/v1/header_pb2_grpc.pyi +++ b/gen/python/grpc/caraml/upi/v1/header_pb2_grpc.pyi @@ -2,3 +2,16 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ +import abc +import collections.abc +import grpc +import grpc.aio +import typing + +_T = typing.TypeVar('_T') + +class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): + ... + +class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore + ... diff --git a/gen/python/grpc/caraml/upi/v1/observation_log_pb2.py b/gen/python/grpc/caraml/upi/v1/observation_log_pb2.py index 24723b4..3f588ff 100644 --- a/gen/python/grpc/caraml/upi/v1/observation_log_pb2.py +++ b/gen/python/grpc/caraml/upi/v1/observation_log_pb2.py @@ -4,9 +4,8 @@ """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 +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -17,57 +16,24 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#caraml/upi/v1/observation_log.proto\x12\rcaraml.upi.v1\x1a\x1c\x63\x61raml/upi/v1/variable.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto\"\x81\x01\n\x11ObservationLogKey\x12\x30\n\x14observation_batch_id\x18\x01 \x01(\tR\x12observationBatchId\x12#\n\rprediction_id\x18\x02 \x01(\tR\x0cpredictionId\x12\x15\n\x06row_id\x18\x03 \x01(\tR\x05rowId\"\xd0\x02\n\x0eObservationLog\x12#\n\rprediction_id\x18\x01 \x01(\tR\x0cpredictionId\x12\x15\n\x06row_id\x18\x02 \x01(\tR\x05rowId\x12\x1f\n\x0btarget_name\x18\x03 \x01(\tR\ntargetName\x12\x46\n\x12observation_values\x18\x04 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\x11observationValues\x12H\n\x13observation_context\x18\x05 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\x12observationContext\x12O\n\x15observation_timestamp\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x14observationTimestamp\"[\n\x16LogObservationsRequest\x12\x41\n\x0cobservations\x18\x01 \x03(\x0b\x32\x1d.caraml.upi.v1.ObservationLogR\x0cobservations\"K\n\x17LogObservationsResponse\x12\x30\n\x14observation_batch_id\x18\x01 \x01(\tR\x12observationBatchId2\x97\x01\n\x12ObservationService\x12\x80\x01\n\x0fLogObservations\x12%.caraml.upi.v1.LogObservationsRequest\x1a&.caraml.upi.v1.LogObservationsResponse\"\x1e\x82\xd3\xe4\x93\x02\x18:\x01*\"\x13/v1/log-observationB\xcf\x01\n\x11\x63om.caraml.upi.v1B\x13ObservationLogProtoP\x01ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\xa2\x02\x03\x43UX\xaa\x02\rCaraml.Upi.V1\xca\x02\rCaraml\\Upi\\V1\xe2\x02\x19\x43\x61raml\\Upi\\V1\\GPBMetadata\xea\x02\x0f\x43\x61raml::Upi::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#caraml/upi/v1/observation_log.proto\x12\rcaraml.upi.v1\x1a\x1c\x63\x61raml/upi/v1/variable.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto\"\x81\x01\n\x11ObservationLogKey\x12\x30\n\x14observation_batch_id\x18\x01 \x01(\tR\x12observationBatchId\x12#\n\rprediction_id\x18\x02 \x01(\tR\x0cpredictionId\x12\x15\n\x06row_id\x18\x03 \x01(\tR\x05rowId\"\xd0\x02\n\x0eObservationLog\x12#\n\rprediction_id\x18\x01 \x01(\tR\x0cpredictionId\x12\x15\n\x06row_id\x18\x02 \x01(\tR\x05rowId\x12\x1f\n\x0btarget_name\x18\x03 \x01(\tR\ntargetName\x12\x46\n\x12observation_values\x18\x04 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\x11observationValues\x12H\n\x13observation_context\x18\x05 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\x12observationContext\x12O\n\x15observation_timestamp\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x14observationTimestamp\"[\n\x16LogObservationsRequest\x12\x41\n\x0cobservations\x18\x01 \x03(\x0b\x32\x1d.caraml.upi.v1.ObservationLogR\x0cobservations\"K\n\x17LogObservationsResponse\x12\x30\n\x14observation_batch_id\x18\x01 \x01(\tR\x12observationBatchId2\x97\x01\n\x12ObservationService\x12\x80\x01\n\x0fLogObservations\x12%.caraml.upi.v1.LogObservationsRequest\x1a&.caraml.upi.v1.LogObservationsResponse\"\x1e\x82\xd3\xe4\x93\x02\x18\"\x13/v1/log-observation:\x01*B\xcf\x01\n\x11\x63om.caraml.upi.v1B\x13ObservationLogProtoP\x01ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\xa2\x02\x03\x43UX\xaa\x02\rCaraml.Upi.V1\xca\x02\rCaraml\\Upi\\V1\xe2\x02\x19\x43\x61raml\\Upi\\V1\\GPBMetadata\xea\x02\x0f\x43\x61raml::Upi::V1b\x06proto3') - - -_OBSERVATIONLOGKEY = DESCRIPTOR.message_types_by_name['ObservationLogKey'] -_OBSERVATIONLOG = DESCRIPTOR.message_types_by_name['ObservationLog'] -_LOGOBSERVATIONSREQUEST = DESCRIPTOR.message_types_by_name['LogObservationsRequest'] -_LOGOBSERVATIONSRESPONSE = DESCRIPTOR.message_types_by_name['LogObservationsResponse'] -ObservationLogKey = _reflection.GeneratedProtocolMessageType('ObservationLogKey', (_message.Message,), { - 'DESCRIPTOR' : _OBSERVATIONLOGKEY, - '__module__' : 'caraml.upi.v1.observation_log_pb2' - # @@protoc_insertion_point(class_scope:caraml.upi.v1.ObservationLogKey) - }) -_sym_db.RegisterMessage(ObservationLogKey) - -ObservationLog = _reflection.GeneratedProtocolMessageType('ObservationLog', (_message.Message,), { - 'DESCRIPTOR' : _OBSERVATIONLOG, - '__module__' : 'caraml.upi.v1.observation_log_pb2' - # @@protoc_insertion_point(class_scope:caraml.upi.v1.ObservationLog) - }) -_sym_db.RegisterMessage(ObservationLog) - -LogObservationsRequest = _reflection.GeneratedProtocolMessageType('LogObservationsRequest', (_message.Message,), { - 'DESCRIPTOR' : _LOGOBSERVATIONSREQUEST, - '__module__' : 'caraml.upi.v1.observation_log_pb2' - # @@protoc_insertion_point(class_scope:caraml.upi.v1.LogObservationsRequest) - }) -_sym_db.RegisterMessage(LogObservationsRequest) - -LogObservationsResponse = _reflection.GeneratedProtocolMessageType('LogObservationsResponse', (_message.Message,), { - 'DESCRIPTOR' : _LOGOBSERVATIONSRESPONSE, - '__module__' : 'caraml.upi.v1.observation_log_pb2' - # @@protoc_insertion_point(class_scope:caraml.upi.v1.LogObservationsResponse) - }) -_sym_db.RegisterMessage(LogObservationsResponse) - -_OBSERVATIONSERVICE = DESCRIPTOR.services_by_name['ObservationService'] +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'caraml.upi.v1.observation_log_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\021com.caraml.upi.v1B\023ObservationLogProtoP\001ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\242\002\003CUX\252\002\rCaraml.Upi.V1\312\002\rCaraml\\Upi\\V1\342\002\031Caraml\\Upi\\V1\\GPBMetadata\352\002\017Caraml::Upi::V1' - _OBSERVATIONSERVICE.methods_by_name['LogObservations']._options = None - _OBSERVATIONSERVICE.methods_by_name['LogObservations']._serialized_options = b'\202\323\344\223\002\030:\001*\"\023/v1/log-observation' - _OBSERVATIONLOGKEY._serialized_start=148 - _OBSERVATIONLOGKEY._serialized_end=277 - _OBSERVATIONLOG._serialized_start=280 - _OBSERVATIONLOG._serialized_end=616 - _LOGOBSERVATIONSREQUEST._serialized_start=618 - _LOGOBSERVATIONSREQUEST._serialized_end=709 - _LOGOBSERVATIONSRESPONSE._serialized_start=711 - _LOGOBSERVATIONSRESPONSE._serialized_end=786 - _OBSERVATIONSERVICE._serialized_start=789 - _OBSERVATIONSERVICE._serialized_end=940 + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\021com.caraml.upi.v1B\023ObservationLogProtoP\001ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\242\002\003CUX\252\002\rCaraml.Upi.V1\312\002\rCaraml\\Upi\\V1\342\002\031Caraml\\Upi\\V1\\GPBMetadata\352\002\017Caraml::Upi::V1' + _globals['_OBSERVATIONSERVICE'].methods_by_name['LogObservations']._options = None + _globals['_OBSERVATIONSERVICE'].methods_by_name['LogObservations']._serialized_options = b'\202\323\344\223\002\030\"\023/v1/log-observation:\001*' + _globals['_OBSERVATIONLOGKEY']._serialized_start=148 + _globals['_OBSERVATIONLOGKEY']._serialized_end=277 + _globals['_OBSERVATIONLOG']._serialized_start=280 + _globals['_OBSERVATIONLOG']._serialized_end=616 + _globals['_LOGOBSERVATIONSREQUEST']._serialized_start=618 + _globals['_LOGOBSERVATIONSREQUEST']._serialized_end=709 + _globals['_LOGOBSERVATIONSRESPONSE']._serialized_start=711 + _globals['_LOGOBSERVATIONSRESPONSE']._serialized_end=786 + _globals['_OBSERVATIONSERVICE']._serialized_start=789 + _globals['_OBSERVATIONSERVICE']._serialized_end=940 # @@protoc_insertion_point(module_scope) diff --git a/gen/python/grpc/caraml/upi/v1/observation_log_pb2.pyi b/gen/python/grpc/caraml/upi/v1/observation_log_pb2.pyi index bc06726..95ce089 100644 --- a/gen/python/grpc/caraml/upi/v1/observation_log_pb2.pyi +++ b/gen/python/grpc/caraml/upi/v1/observation_log_pb2.pyi @@ -4,120 +4,132 @@ isort:skip_file """ import builtins import caraml.upi.v1.variable_pb2 +import collections.abc import google.protobuf.descriptor import google.protobuf.internal.containers import google.protobuf.message import google.protobuf.timestamp_pb2 -import typing -import typing_extensions +import sys + +if sys.version_info >= (3, 8): + import typing as typing_extensions +else: + import typing_extensions DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing_extensions.final class ObservationLogKey(google.protobuf.message.Message): """ObservationLogKey contains necessary values for generating unique records for downstream usages, eg. Dataset Generation Service """ + DESCRIPTOR: google.protobuf.descriptor.Descriptor + OBSERVATION_BATCH_ID_FIELD_NUMBER: builtins.int PREDICTION_ID_FIELD_NUMBER: builtins.int ROW_ID_FIELD_NUMBER: builtins.int - observation_batch_id: typing.Text + observation_batch_id: builtins.str """Id to uniquely identify records from a batch of observation logs""" - - prediction_id: typing.Text + prediction_id: builtins.str """Unique identifier of a prediction response returned by prediction service. This information is used to join the prediction to an observation. """ - - row_id: typing.Text + row_id: builtins.str """Prediction requests may contain multiple prediction instances. The row_id identifies a particular prediction instance that was used to produce an observation. This information is used to join the prediction to an observation. """ - - def __init__(self, + def __init__( + self, *, - observation_batch_id: typing.Text = ..., - prediction_id: typing.Text = ..., - row_id: typing.Text = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["observation_batch_id",b"observation_batch_id","prediction_id",b"prediction_id","row_id",b"row_id"]) -> None: ... + observation_batch_id: builtins.str = ..., + prediction_id: builtins.str = ..., + row_id: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["observation_batch_id", b"observation_batch_id", "prediction_id", b"prediction_id", "row_id", b"row_id"]) -> None: ... + global___ObservationLogKey = ObservationLogKey +@typing_extensions.final class ObservationLog(google.protobuf.message.Message): """ObservationLog represents ground truth signals to be combined with the prediction log produced by CaraML prediction service to form data sets used for training ML models """ + DESCRIPTOR: google.protobuf.descriptor.Descriptor + PREDICTION_ID_FIELD_NUMBER: builtins.int ROW_ID_FIELD_NUMBER: builtins.int TARGET_NAME_FIELD_NUMBER: builtins.int OBSERVATION_VALUES_FIELD_NUMBER: builtins.int OBSERVATION_CONTEXT_FIELD_NUMBER: builtins.int OBSERVATION_TIMESTAMP_FIELD_NUMBER: builtins.int - prediction_id: typing.Text + prediction_id: builtins.str """Unique identifier of a prediction response returned by prediction service. This information is used to join the prediction to an observation. """ - - row_id: typing.Text + row_id: builtins.str """Prediction requests may contain multiple prediction instances. The row_id identifies a particular prediction instance that was used to produce an observation. This information is used to join the prediction to an observation. """ - - target_name: typing.Text + target_name: builtins.str """The name of the observation target. This information is used to join the prediction to an observation.""" - @property def observation_values(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[caraml.upi.v1.variable_pb2.Variable]: """The ground-truth value. It can be a double, string or integer type.""" - pass @property def observation_context(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[caraml.upi.v1.variable_pb2.Variable]: """A set of key-value pairs to provide additional context for the observation.""" - pass @property def observation_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: """Timestamp when the observation is made""" - pass - def __init__(self, + def __init__( + self, *, - prediction_id: typing.Text = ..., - row_id: typing.Text = ..., - target_name: typing.Text = ..., - observation_values: typing.Optional[typing.Iterable[caraml.upi.v1.variable_pb2.Variable]] = ..., - observation_context: typing.Optional[typing.Iterable[caraml.upi.v1.variable_pb2.Variable]] = ..., - observation_timestamp: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["observation_timestamp",b"observation_timestamp"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["observation_context",b"observation_context","observation_timestamp",b"observation_timestamp","observation_values",b"observation_values","prediction_id",b"prediction_id","row_id",b"row_id","target_name",b"target_name"]) -> None: ... + prediction_id: builtins.str = ..., + row_id: builtins.str = ..., + target_name: builtins.str = ..., + observation_values: collections.abc.Iterable[caraml.upi.v1.variable_pb2.Variable] | None = ..., + observation_context: collections.abc.Iterable[caraml.upi.v1.variable_pb2.Variable] | None = ..., + observation_timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["observation_timestamp", b"observation_timestamp"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["observation_context", b"observation_context", "observation_timestamp", b"observation_timestamp", "observation_values", b"observation_values", "prediction_id", b"prediction_id", "row_id", b"row_id", "target_name", b"target_name"]) -> None: ... + global___ObservationLog = ObservationLog +@typing_extensions.final class LogObservationsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + OBSERVATIONS_FIELD_NUMBER: builtins.int @property def observations(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ObservationLog]: """List of observations per request""" - pass - def __init__(self, + def __init__( + self, *, - observations: typing.Optional[typing.Iterable[global___ObservationLog]] = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["observations",b"observations"]) -> None: ... + observations: collections.abc.Iterable[global___ObservationLog] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["observations", b"observations"]) -> None: ... + global___LogObservationsRequest = LogObservationsRequest +@typing_extensions.final class LogObservationsResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + OBSERVATION_BATCH_ID_FIELD_NUMBER: builtins.int - observation_batch_id: typing.Text + observation_batch_id: builtins.str """Unique identifier to identify records from a batch of observation logs""" - - def __init__(self, + def __init__( + self, *, - observation_batch_id: typing.Text = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["observation_batch_id",b"observation_batch_id"]) -> None: ... + observation_batch_id: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["observation_batch_id", b"observation_batch_id"]) -> None: ... + global___LogObservationsResponse = LogObservationsResponse diff --git a/gen/python/grpc/caraml/upi/v1/observation_log_pb2_grpc.pyi b/gen/python/grpc/caraml/upi/v1/observation_log_pb2_grpc.pyi index 4ef867d..f790322 100644 --- a/gen/python/grpc/caraml/upi/v1/observation_log_pb2_grpc.pyi +++ b/gen/python/grpc/caraml/upi/v1/observation_log_pb2_grpc.pyi @@ -4,23 +4,44 @@ isort:skip_file """ import abc import caraml.upi.v1.observation_log_pb2 +import collections.abc import grpc +import grpc.aio +import typing + +_T = typing.TypeVar('_T') + +class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): + ... + +class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore + ... class ObservationServiceStub: """Service for logging observations""" - def __init__(self, channel: grpc.Channel) -> None: ... + + def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ... LogObservations: grpc.UnaryUnaryMultiCallable[ caraml.upi.v1.observation_log_pb2.LogObservationsRequest, - caraml.upi.v1.observation_log_pb2.LogObservationsResponse] + caraml.upi.v1.observation_log_pb2.LogObservationsResponse, + ] +class ObservationServiceAsyncStub: + """Service for logging observations""" + + LogObservations: grpc.aio.UnaryUnaryMultiCallable[ + caraml.upi.v1.observation_log_pb2.LogObservationsRequest, + caraml.upi.v1.observation_log_pb2.LogObservationsResponse, + ] class ObservationServiceServicer(metaclass=abc.ABCMeta): """Service for logging observations""" + @abc.abstractmethod - def LogObservations(self, + def LogObservations( + self, request: caraml.upi.v1.observation_log_pb2.LogObservationsRequest, - context: grpc.ServicerContext, - ) -> caraml.upi.v1.observation_log_pb2.LogObservationsResponse: ... - + context: _ServicerContext, + ) -> typing.Union[caraml.upi.v1.observation_log_pb2.LogObservationsResponse, collections.abc.Awaitable[caraml.upi.v1.observation_log_pb2.LogObservationsResponse]]: ... -def add_ObservationServiceServicer_to_server(servicer: ObservationServiceServicer, server: grpc.Server) -> None: ... +def add_ObservationServiceServicer_to_server(servicer: ObservationServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ... diff --git a/gen/python/grpc/caraml/upi/v1/prediction_log_pb2.py b/gen/python/grpc/caraml/upi/v1/prediction_log_pb2.py index 35fdce6..a7eb40a 100644 --- a/gen/python/grpc/caraml/upi/v1/prediction_log_pb2.py +++ b/gen/python/grpc/caraml/upi/v1/prediction_log_pb2.py @@ -4,9 +4,8 @@ """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 +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -20,40 +19,16 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"caraml/upi/v1/prediction_log.proto\x12\rcaraml.upi.v1\x1a\x1a\x63\x61raml/upi/v1/header.proto\x1a\x1c\x63\x61raml/upi/v1/variable.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x9c\x03\n\rPredictionLog\x12#\n\rprediction_id\x18\x01 \x01(\tR\x0cpredictionId\x12\x1f\n\x0btarget_name\x18\x02 \x01(\tR\ntargetName\x12!\n\x0cproject_name\x18\x03 \x01(\tR\x0bprojectName\x12\x1d\n\nmodel_name\x18\x04 \x01(\tR\tmodelName\x12#\n\rmodel_version\x18\x05 \x01(\tR\x0cmodelVersion\x12/\n\x05input\x18\n \x01(\x0b\x32\x19.caraml.upi.v1.ModelInputR\x05input\x12\x32\n\x06output\x18\x0b \x01(\x0b\x32\x1a.caraml.upi.v1.ModelOutputR\x06output\x12G\n\x11request_timestamp\x18\x14 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x10requestTimestamp\x12\x30\n\x14table_schema_version\x18\x64 \x01(\rR\x12tableSchemaVersion\"\xc1\x02\n\nModelInput\x12>\n\x0e\x66\x65\x61tures_table\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructR\rfeaturesTable\x12>\n\x0e\x65ntities_table\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructR\rentitiesTable\x12:\n\x0craw_features\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructR\x0brawFeatures\x12\x46\n\x12prediction_context\x18\x04 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\x11predictionContext\x12/\n\x07headers\x18\n \x03(\x0b\x32\x15.caraml.upi.v1.HeaderR\x07headers\"\x8b\x02\n\x0bModelOutput\x12Q\n\x18prediction_results_table\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructR\x16predictionResultsTable\x12\x46\n\x12prediction_context\x18\x02 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\x11predictionContext\x12/\n\x07headers\x18\n \x03(\x0b\x32\x15.caraml.upi.v1.HeaderR\x07headers\x12\x16\n\x06status\x18\x0b \x01(\rR\x06status\x12\x18\n\x07message\x18\x0c \x01(\tR\x07messageB\xce\x01\n\x11\x63om.caraml.upi.v1B\x12PredictionLogProtoP\x01ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\xa2\x02\x03\x43UX\xaa\x02\rCaraml.Upi.V1\xca\x02\rCaraml\\Upi\\V1\xe2\x02\x19\x43\x61raml\\Upi\\V1\\GPBMetadata\xea\x02\x0f\x43\x61raml::Upi::V1b\x06proto3') - - -_PREDICTIONLOG = DESCRIPTOR.message_types_by_name['PredictionLog'] -_MODELINPUT = DESCRIPTOR.message_types_by_name['ModelInput'] -_MODELOUTPUT = DESCRIPTOR.message_types_by_name['ModelOutput'] -PredictionLog = _reflection.GeneratedProtocolMessageType('PredictionLog', (_message.Message,), { - 'DESCRIPTOR' : _PREDICTIONLOG, - '__module__' : 'caraml.upi.v1.prediction_log_pb2' - # @@protoc_insertion_point(class_scope:caraml.upi.v1.PredictionLog) - }) -_sym_db.RegisterMessage(PredictionLog) - -ModelInput = _reflection.GeneratedProtocolMessageType('ModelInput', (_message.Message,), { - 'DESCRIPTOR' : _MODELINPUT, - '__module__' : 'caraml.upi.v1.prediction_log_pb2' - # @@protoc_insertion_point(class_scope:caraml.upi.v1.ModelInput) - }) -_sym_db.RegisterMessage(ModelInput) - -ModelOutput = _reflection.GeneratedProtocolMessageType('ModelOutput', (_message.Message,), { - 'DESCRIPTOR' : _MODELOUTPUT, - '__module__' : 'caraml.upi.v1.prediction_log_pb2' - # @@protoc_insertion_point(class_scope:caraml.upi.v1.ModelOutput) - }) -_sym_db.RegisterMessage(ModelOutput) - +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'caraml.upi.v1.prediction_log_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\021com.caraml.upi.v1B\022PredictionLogProtoP\001ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\242\002\003CUX\252\002\rCaraml.Upi.V1\312\002\rCaraml\\Upi\\V1\342\002\031Caraml\\Upi\\V1\\GPBMetadata\352\002\017Caraml::Upi::V1' - _PREDICTIONLOG._serialized_start=175 - _PREDICTIONLOG._serialized_end=587 - _MODELINPUT._serialized_start=590 - _MODELINPUT._serialized_end=911 - _MODELOUTPUT._serialized_start=914 - _MODELOUTPUT._serialized_end=1181 + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\021com.caraml.upi.v1B\022PredictionLogProtoP\001ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\242\002\003CUX\252\002\rCaraml.Upi.V1\312\002\rCaraml\\Upi\\V1\342\002\031Caraml\\Upi\\V1\\GPBMetadata\352\002\017Caraml::Upi::V1' + _globals['_PREDICTIONLOG']._serialized_start=175 + _globals['_PREDICTIONLOG']._serialized_end=587 + _globals['_MODELINPUT']._serialized_start=590 + _globals['_MODELINPUT']._serialized_end=911 + _globals['_MODELOUTPUT']._serialized_start=914 + _globals['_MODELOUTPUT']._serialized_end=1181 # @@protoc_insertion_point(module_scope) diff --git a/gen/python/grpc/caraml/upi/v1/prediction_log_pb2.pyi b/gen/python/grpc/caraml/upi/v1/prediction_log_pb2.pyi index 0e58f2e..7b8656d 100644 --- a/gen/python/grpc/caraml/upi/v1/prediction_log_pb2.pyi +++ b/gen/python/grpc/caraml/upi/v1/prediction_log_pb2.pyi @@ -5,19 +5,27 @@ isort:skip_file import builtins import caraml.upi.v1.header_pb2 import caraml.upi.v1.variable_pb2 +import collections.abc import google.protobuf.descriptor import google.protobuf.internal.containers import google.protobuf.message import google.protobuf.struct_pb2 import google.protobuf.timestamp_pb2 -import typing -import typing_extensions +import sys + +if sys.version_info >= (3, 8): + import typing as typing_extensions +else: + import typing_extensions DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing_extensions.final class PredictionLog(google.protobuf.message.Message): """PredictionLog stores information of prediction request handled by a specific model version.""" + DESCRIPTOR: google.protobuf.descriptor.Descriptor + PREDICTION_ID_FIELD_NUMBER: builtins.int TARGET_NAME_FIELD_NUMBER: builtins.int PROJECT_NAME_FIELD_NUMBER: builtins.int @@ -27,59 +35,55 @@ class PredictionLog(google.protobuf.message.Message): OUTPUT_FIELD_NUMBER: builtins.int REQUEST_TIMESTAMP_FIELD_NUMBER: builtins.int TABLE_SCHEMA_VERSION_FIELD_NUMBER: builtins.int - prediction_id: typing.Text + prediction_id: builtins.str """Unique identifier of prediction.""" - - target_name: typing.Text + target_name: builtins.str """Target name / concept to be predicted by the prediction.""" - - project_name: typing.Text + project_name: builtins.str """Project name that host the model performing prediction.""" - - model_name: typing.Text + model_name: builtins.str """Model name performing the prediction.""" - - model_version: typing.Text + model_version: builtins.str """Model version performing the prediction.""" - @property def input(self) -> global___ModelInput: """Input of the prediction process""" - pass @property def output(self) -> global___ModelOutput: """Output of the prediction process""" - pass @property def request_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: """Timestamp of the corresponding prediction request""" - pass table_schema_version: builtins.int """Schema version of raw_features, features, entities, and prediction results fields are formatted I.e. for version 1, all of those fields will be formatted as a modified JSON SPLIT representation of a table """ - - def __init__(self, + def __init__( + self, *, - prediction_id: typing.Text = ..., - target_name: typing.Text = ..., - project_name: typing.Text = ..., - model_name: typing.Text = ..., - model_version: typing.Text = ..., - input: typing.Optional[global___ModelInput] = ..., - output: typing.Optional[global___ModelOutput] = ..., - request_timestamp: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ..., + prediction_id: builtins.str = ..., + target_name: builtins.str = ..., + project_name: builtins.str = ..., + model_name: builtins.str = ..., + model_version: builtins.str = ..., + input: global___ModelInput | None = ..., + output: global___ModelOutput | None = ..., + request_timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ..., table_schema_version: builtins.int = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["input",b"input","output",b"output","request_timestamp",b"request_timestamp"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["input",b"input","model_name",b"model_name","model_version",b"model_version","output",b"output","prediction_id",b"prediction_id","project_name",b"project_name","request_timestamp",b"request_timestamp","table_schema_version",b"table_schema_version","target_name",b"target_name"]) -> None: ... + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["input", b"input", "output", b"output", "request_timestamp", b"request_timestamp"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["input", b"input", "model_name", b"model_name", "model_version", b"model_version", "output", b"output", "prediction_id", b"prediction_id", "project_name", b"project_name", "request_timestamp", b"request_timestamp", "table_schema_version", b"table_schema_version", "target_name", b"target_name"]) -> None: ... + global___PredictionLog = PredictionLog +@typing_extensions.final class ModelInput(google.protobuf.message.Message): """Model input stores information of all input for prediction process. The information in model input are extracted from the prediction request received by model. """ + DESCRIPTOR: google.protobuf.descriptor.Descriptor + FEATURES_TABLE_FIELD_NUMBER: builtins.int ENTITIES_TABLE_FIELD_NUMBER: builtins.int RAW_FEATURES_FIELD_NUMBER: builtins.int @@ -88,40 +92,40 @@ class ModelInput(google.protobuf.message.Message): @property def features_table(self) -> google.protobuf.struct_pb2.Struct: """JSON-representation of features table. "table_schema_version" field describe the encoding of this field.""" - pass @property def entities_table(self) -> google.protobuf.struct_pb2.Struct: """JSON-representation of entities table. "table_schema_version" field describe the encoding of this field.""" - pass @property def raw_features(self) -> google.protobuf.struct_pb2.Struct: """JSON-representation of raw_features table. "table_schema_version" field describe the encoding of this field.""" - pass @property def prediction_context(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[caraml.upi.v1.variable_pb2.Variable]: """Context of the prediction request.""" - pass @property def headers(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[caraml.upi.v1.header_pb2.Header]: """map containing request headers/metadata""" - pass - def __init__(self, + def __init__( + self, *, - features_table: typing.Optional[google.protobuf.struct_pb2.Struct] = ..., - entities_table: typing.Optional[google.protobuf.struct_pb2.Struct] = ..., - raw_features: typing.Optional[google.protobuf.struct_pb2.Struct] = ..., - prediction_context: typing.Optional[typing.Iterable[caraml.upi.v1.variable_pb2.Variable]] = ..., - headers: typing.Optional[typing.Iterable[caraml.upi.v1.header_pb2.Header]] = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["entities_table",b"entities_table","features_table",b"features_table","raw_features",b"raw_features"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["entities_table",b"entities_table","features_table",b"features_table","headers",b"headers","prediction_context",b"prediction_context","raw_features",b"raw_features"]) -> None: ... + features_table: google.protobuf.struct_pb2.Struct | None = ..., + entities_table: google.protobuf.struct_pb2.Struct | None = ..., + raw_features: google.protobuf.struct_pb2.Struct | None = ..., + prediction_context: collections.abc.Iterable[caraml.upi.v1.variable_pb2.Variable] | None = ..., + headers: collections.abc.Iterable[caraml.upi.v1.header_pb2.Header] | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["entities_table", b"entities_table", "features_table", b"features_table", "raw_features", b"raw_features"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["entities_table", b"entities_table", "features_table", b"features_table", "headers", b"headers", "prediction_context", b"prediction_context", "raw_features", b"raw_features"]) -> None: ... + global___ModelInput = ModelInput +@typing_extensions.final class ModelOutput(google.protobuf.message.Message): """Model output stores information of all output produced from prediction process. Model output is extracted from the prediction response sent by model. """ + DESCRIPTOR: google.protobuf.descriptor.Descriptor + PREDICTION_RESULTS_TABLE_FIELD_NUMBER: builtins.int PREDICTION_CONTEXT_FIELD_NUMBER: builtins.int HEADERS_FIELD_NUMBER: builtins.int @@ -130,29 +134,26 @@ class ModelOutput(google.protobuf.message.Message): @property def prediction_results_table(self) -> google.protobuf.struct_pb2.Struct: """JSON-representation of prediction result table. "table_schema_version" field describe the encoding of this field.""" - pass @property def prediction_context(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[caraml.upi.v1.variable_pb2.Variable]: """Context of the prediction response.""" - pass @property def headers(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[caraml.upi.v1.header_pb2.Header]: """map containing response headers/metadata""" - pass status: builtins.int """grpc status of the response from model (see https://grpc.github.io/grpc/core/md_doc_statuscodes.html)""" - - message: typing.Text + message: builtins.str """grpc message""" - - def __init__(self, + def __init__( + self, *, - prediction_results_table: typing.Optional[google.protobuf.struct_pb2.Struct] = ..., - prediction_context: typing.Optional[typing.Iterable[caraml.upi.v1.variable_pb2.Variable]] = ..., - headers: typing.Optional[typing.Iterable[caraml.upi.v1.header_pb2.Header]] = ..., + prediction_results_table: google.protobuf.struct_pb2.Struct | None = ..., + prediction_context: collections.abc.Iterable[caraml.upi.v1.variable_pb2.Variable] | None = ..., + headers: collections.abc.Iterable[caraml.upi.v1.header_pb2.Header] | None = ..., status: builtins.int = ..., - message: typing.Text = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["prediction_results_table",b"prediction_results_table"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["headers",b"headers","message",b"message","prediction_context",b"prediction_context","prediction_results_table",b"prediction_results_table","status",b"status"]) -> None: ... + message: builtins.str = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["prediction_results_table", b"prediction_results_table"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["headers", b"headers", "message", b"message", "prediction_context", b"prediction_context", "prediction_results_table", b"prediction_results_table", "status", b"status"]) -> None: ... + global___ModelOutput = ModelOutput diff --git a/gen/python/grpc/caraml/upi/v1/prediction_log_pb2_grpc.pyi b/gen/python/grpc/caraml/upi/v1/prediction_log_pb2_grpc.pyi index f3a5a08..b13382f 100644 --- a/gen/python/grpc/caraml/upi/v1/prediction_log_pb2_grpc.pyi +++ b/gen/python/grpc/caraml/upi/v1/prediction_log_pb2_grpc.pyi @@ -2,3 +2,16 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ +import abc +import collections.abc +import grpc +import grpc.aio +import typing + +_T = typing.TypeVar('_T') + +class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): + ... + +class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore + ... diff --git a/gen/python/grpc/caraml/upi/v1/router_log_pb2.py b/gen/python/grpc/caraml/upi/v1/router_log_pb2.py index e8a0a20..b54f692 100644 --- a/gen/python/grpc/caraml/upi/v1/router_log_pb2.py +++ b/gen/python/grpc/caraml/upi/v1/router_log_pb2.py @@ -4,9 +4,8 @@ """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 +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -21,50 +20,18 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1e\x63\x61raml/upi/v1/router_log.proto\x12\rcaraml.upi.v1\x1a\x1a\x63\x61raml/upi/v1/header.proto\x1a\x1c\x63\x61raml/upi/v1/variable.proto\x1a\x17\x63\x61raml/upi/v1/upi.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xfa\x03\n\tRouterLog\x12#\n\rprediction_id\x18\x01 \x01(\tR\x0cpredictionId\x12\x1f\n\x0btarget_name\x18\x02 \x01(\tR\ntargetName\x12!\n\x0cproject_name\x18\x03 \x01(\tR\x0bprojectName\x12\x1f\n\x0brouter_name\x18\x04 \x01(\tR\nrouterName\x12%\n\x0erouter_version\x18\x05 \x01(\tR\rrouterVersion\x12@\n\rrouting_logic\x18\n \x01(\x0b\x32\x1b.caraml.upi.v1.RoutingLogicR\x0croutingLogic\x12=\n\x0crouter_input\x18\x0b \x01(\x0b\x32\x1a.caraml.upi.v1.RouterInputR\x0brouterInput\x12@\n\rrouter_output\x18\x0c \x01(\x0b\x32\x1b.caraml.upi.v1.RouterOutputR\x0crouterOutput\x12G\n\x11request_timestamp\x18\x14 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x10requestTimestamp\x12\x30\n\x14table_schema_version\x18\x64 \x01(\rR\x12tableSchemaVersion\"\xb7\x01\n\x0cRoutingLogic\x12\x34\n\x06models\x18\x01 \x03(\x0b\x32\x1c.caraml.upi.v1.ModelMetadataR\x06models\x12!\n\x0ctraffic_rule\x18\x02 \x01(\tR\x0btrafficRule\x12\'\n\x0f\x65xperiment_name\x18\x03 \x01(\tR\x0e\x65xperimentName\x12%\n\x0etreatment_name\x18\x04 \x01(\tR\rtreatmentName\"\xe0\x02\n\x0bRouterInput\x12\x42\n\x10prediction_table\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructR\x0fpredictionTable\x12\x46\n\x12transformer_tables\x18\x02 \x03(\x0b\x32\x17.google.protobuf.StructR\x11transformerTables\x12L\n\x15transformer_variables\x18\x03 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\x14transformerVariables\x12\x46\n\x12prediction_context\x18\x04 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\x11predictionContext\x12/\n\x07headers\x18\n \x03(\x0b\x32\x15.caraml.upi.v1.HeaderR\x07headers\"\x8c\x02\n\x0cRouterOutput\x12Q\n\x18prediction_results_table\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructR\x16predictionResultsTable\x12\x46\n\x12prediction_context\x18\x02 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\x11predictionContext\x12/\n\x07headers\x18\n \x03(\x0b\x32\x15.caraml.upi.v1.HeaderR\x07headers\x12\x16\n\x06status\x18\x0b \x01(\rR\x06status\x12\x18\n\x07message\x18\x0c \x01(\tR\x07messageB\xca\x01\n\x11\x63om.caraml.upi.v1B\x0eRouterLogProtoP\x01ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\xa2\x02\x03\x43UX\xaa\x02\rCaraml.Upi.V1\xca\x02\rCaraml\\Upi\\V1\xe2\x02\x19\x43\x61raml\\Upi\\V1\\GPBMetadata\xea\x02\x0f\x43\x61raml::Upi::V1b\x06proto3') - - -_ROUTERLOG = DESCRIPTOR.message_types_by_name['RouterLog'] -_ROUTINGLOGIC = DESCRIPTOR.message_types_by_name['RoutingLogic'] -_ROUTERINPUT = DESCRIPTOR.message_types_by_name['RouterInput'] -_ROUTEROUTPUT = DESCRIPTOR.message_types_by_name['RouterOutput'] -RouterLog = _reflection.GeneratedProtocolMessageType('RouterLog', (_message.Message,), { - 'DESCRIPTOR' : _ROUTERLOG, - '__module__' : 'caraml.upi.v1.router_log_pb2' - # @@protoc_insertion_point(class_scope:caraml.upi.v1.RouterLog) - }) -_sym_db.RegisterMessage(RouterLog) - -RoutingLogic = _reflection.GeneratedProtocolMessageType('RoutingLogic', (_message.Message,), { - 'DESCRIPTOR' : _ROUTINGLOGIC, - '__module__' : 'caraml.upi.v1.router_log_pb2' - # @@protoc_insertion_point(class_scope:caraml.upi.v1.RoutingLogic) - }) -_sym_db.RegisterMessage(RoutingLogic) - -RouterInput = _reflection.GeneratedProtocolMessageType('RouterInput', (_message.Message,), { - 'DESCRIPTOR' : _ROUTERINPUT, - '__module__' : 'caraml.upi.v1.router_log_pb2' - # @@protoc_insertion_point(class_scope:caraml.upi.v1.RouterInput) - }) -_sym_db.RegisterMessage(RouterInput) - -RouterOutput = _reflection.GeneratedProtocolMessageType('RouterOutput', (_message.Message,), { - 'DESCRIPTOR' : _ROUTEROUTPUT, - '__module__' : 'caraml.upi.v1.router_log_pb2' - # @@protoc_insertion_point(class_scope:caraml.upi.v1.RouterOutput) - }) -_sym_db.RegisterMessage(RouterOutput) - +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'caraml.upi.v1.router_log_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\021com.caraml.upi.v1B\016RouterLogProtoP\001ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\242\002\003CUX\252\002\rCaraml.Upi.V1\312\002\rCaraml\\Upi\\V1\342\002\031Caraml\\Upi\\V1\\GPBMetadata\352\002\017Caraml::Upi::V1' - _ROUTERLOG._serialized_start=196 - _ROUTERLOG._serialized_end=702 - _ROUTINGLOGIC._serialized_start=705 - _ROUTINGLOGIC._serialized_end=888 - _ROUTERINPUT._serialized_start=891 - _ROUTERINPUT._serialized_end=1243 - _ROUTEROUTPUT._serialized_start=1246 - _ROUTEROUTPUT._serialized_end=1514 + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\021com.caraml.upi.v1B\016RouterLogProtoP\001ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\242\002\003CUX\252\002\rCaraml.Upi.V1\312\002\rCaraml\\Upi\\V1\342\002\031Caraml\\Upi\\V1\\GPBMetadata\352\002\017Caraml::Upi::V1' + _globals['_ROUTERLOG']._serialized_start=196 + _globals['_ROUTERLOG']._serialized_end=702 + _globals['_ROUTINGLOGIC']._serialized_start=705 + _globals['_ROUTINGLOGIC']._serialized_end=888 + _globals['_ROUTERINPUT']._serialized_start=891 + _globals['_ROUTERINPUT']._serialized_end=1243 + _globals['_ROUTEROUTPUT']._serialized_start=1246 + _globals['_ROUTEROUTPUT']._serialized_end=1514 # @@protoc_insertion_point(module_scope) diff --git a/gen/python/grpc/caraml/upi/v1/router_log_pb2.pyi b/gen/python/grpc/caraml/upi/v1/router_log_pb2.pyi index d36472c..a3b5bdf 100644 --- a/gen/python/grpc/caraml/upi/v1/router_log_pb2.pyi +++ b/gen/python/grpc/caraml/upi/v1/router_log_pb2.pyi @@ -6,19 +6,27 @@ import builtins import caraml.upi.v1.header_pb2 import caraml.upi.v1.upi_pb2 import caraml.upi.v1.variable_pb2 +import collections.abc import google.protobuf.descriptor import google.protobuf.internal.containers import google.protobuf.message import google.protobuf.struct_pb2 import google.protobuf.timestamp_pb2 -import typing -import typing_extensions +import sys + +if sys.version_info >= (3, 8): + import typing as typing_extensions +else: + import typing_extensions DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing_extensions.final class RouterLog(google.protobuf.message.Message): """RouterLog stores information of a multi-model orchestration performed by a router.""" + DESCRIPTOR: google.protobuf.descriptor.Descriptor + PREDICTION_ID_FIELD_NUMBER: builtins.int TARGET_NAME_FIELD_NUMBER: builtins.int PROJECT_NAME_FIELD_NUMBER: builtins.int @@ -29,62 +37,57 @@ class RouterLog(google.protobuf.message.Message): ROUTER_OUTPUT_FIELD_NUMBER: builtins.int REQUEST_TIMESTAMP_FIELD_NUMBER: builtins.int TABLE_SCHEMA_VERSION_FIELD_NUMBER: builtins.int - prediction_id: typing.Text + prediction_id: builtins.str """Unique identifier of prediction.""" - - target_name: typing.Text + target_name: builtins.str """Target name / concept to be predicted by the prediction.""" - - project_name: typing.Text + project_name: builtins.str """Project name that host the router.""" - - router_name: typing.Text + router_name: builtins.str """Name of the router.""" - - router_version: typing.Text + router_version: builtins.str """Router version.""" - @property def routing_logic(self) -> global___RoutingLogic: """Routing logic describes the decision that was made within the router to produce the router output""" - pass @property def router_input(self) -> global___RouterInput: """Input of the router""" - pass @property def router_output(self) -> global___RouterOutput: """Output of the router""" - pass @property def request_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: """Timestamp of the corresponding prediction request""" - pass table_schema_version: builtins.int """Schema version of raw_features, features, entities, and prediction results fields are formatted I.e. for version 1, all of those fields will be formatted as a modified JSON SPLIT representation of a table """ - - def __init__(self, + def __init__( + self, *, - prediction_id: typing.Text = ..., - target_name: typing.Text = ..., - project_name: typing.Text = ..., - router_name: typing.Text = ..., - router_version: typing.Text = ..., - routing_logic: typing.Optional[global___RoutingLogic] = ..., - router_input: typing.Optional[global___RouterInput] = ..., - router_output: typing.Optional[global___RouterOutput] = ..., - request_timestamp: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ..., + prediction_id: builtins.str = ..., + target_name: builtins.str = ..., + project_name: builtins.str = ..., + router_name: builtins.str = ..., + router_version: builtins.str = ..., + routing_logic: global___RoutingLogic | None = ..., + router_input: global___RouterInput | None = ..., + router_output: global___RouterOutput | None = ..., + request_timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ..., table_schema_version: builtins.int = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["request_timestamp",b"request_timestamp","router_input",b"router_input","router_output",b"router_output","routing_logic",b"routing_logic"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["prediction_id",b"prediction_id","project_name",b"project_name","request_timestamp",b"request_timestamp","router_input",b"router_input","router_name",b"router_name","router_output",b"router_output","router_version",b"router_version","routing_logic",b"routing_logic","table_schema_version",b"table_schema_version","target_name",b"target_name"]) -> None: ... + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["request_timestamp", b"request_timestamp", "router_input", b"router_input", "router_output", b"router_output", "routing_logic", b"routing_logic"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["prediction_id", b"prediction_id", "project_name", b"project_name", "request_timestamp", b"request_timestamp", "router_input", b"router_input", "router_name", b"router_name", "router_output", b"router_output", "router_version", b"router_version", "routing_logic", b"routing_logic", "table_schema_version", b"table_schema_version", "target_name", b"target_name"]) -> None: ... + global___RouterLog = RouterLog +@typing_extensions.final class RoutingLogic(google.protobuf.message.Message): """Routing logic describes the decision that was made within the router to produce the router output""" + DESCRIPTOR: google.protobuf.descriptor.Descriptor + MODELS_FIELD_NUMBER: builtins.int TRAFFIC_RULE_FIELD_NUMBER: builtins.int EXPERIMENT_NAME_FIELD_NUMBER: builtins.int @@ -97,31 +100,32 @@ class RoutingLogic(google.protobuf.message.Message): In combiner case, this field can contain more than 1 entries. This field will be used to join witht the prediction log. """ - pass - traffic_rule: typing.Text + traffic_rule: builtins.str """Traffic rule that was used to route the prediction request (optional).""" - - experiment_name: typing.Text + experiment_name: builtins.str """Experiment name that was used to handle the prediction request (optional).""" - - treatment_name: typing.Text + treatment_name: builtins.str """Treatment name from the experiment that was used to handle the prediction request (optional).""" - - def __init__(self, + def __init__( + self, *, - models: typing.Optional[typing.Iterable[caraml.upi.v1.upi_pb2.ModelMetadata]] = ..., - traffic_rule: typing.Text = ..., - experiment_name: typing.Text = ..., - treatment_name: typing.Text = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["experiment_name",b"experiment_name","models",b"models","traffic_rule",b"traffic_rule","treatment_name",b"treatment_name"]) -> None: ... + models: collections.abc.Iterable[caraml.upi.v1.upi_pb2.ModelMetadata] | None = ..., + traffic_rule: builtins.str = ..., + experiment_name: builtins.str = ..., + treatment_name: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["experiment_name", b"experiment_name", "models", b"models", "traffic_rule", b"traffic_rule", "treatment_name", b"treatment_name"]) -> None: ... + global___RoutingLogic = RoutingLogic +@typing_extensions.final class RouterInput(google.protobuf.message.Message): """Input received by router. These informations are extracted from the request received by the router. """ + DESCRIPTOR: google.protobuf.descriptor.Descriptor + PREDICTION_TABLE_FIELD_NUMBER: builtins.int TRANSFORMER_TABLES_FIELD_NUMBER: builtins.int TRANSFORMER_VARIABLES_FIELD_NUMBER: builtins.int @@ -130,40 +134,40 @@ class RouterInput(google.protobuf.message.Message): @property def prediction_table(self) -> google.protobuf.struct_pb2.Struct: """JSON-representation of prediction_table of the UPI request to router. "table_schema_version" field describe the encoding of this field.""" - pass @property def transformer_tables(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[google.protobuf.struct_pb2.Struct]: """List of tables in the transformer inputs in JSON format. "table_schema_version" field describe the encoding of this field.""" - pass @property def transformer_variables(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[caraml.upi.v1.variable_pb2.Variable]: """List of variables extracted from "transformer_inputs" """ - pass @property def prediction_context(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[caraml.upi.v1.variable_pb2.Variable]: """Context of the prediction request.""" - pass @property def headers(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[caraml.upi.v1.header_pb2.Header]: """map containing request headers/metadata""" - pass - def __init__(self, + def __init__( + self, *, - prediction_table: typing.Optional[google.protobuf.struct_pb2.Struct] = ..., - transformer_tables: typing.Optional[typing.Iterable[google.protobuf.struct_pb2.Struct]] = ..., - transformer_variables: typing.Optional[typing.Iterable[caraml.upi.v1.variable_pb2.Variable]] = ..., - prediction_context: typing.Optional[typing.Iterable[caraml.upi.v1.variable_pb2.Variable]] = ..., - headers: typing.Optional[typing.Iterable[caraml.upi.v1.header_pb2.Header]] = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["prediction_table",b"prediction_table"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["headers",b"headers","prediction_context",b"prediction_context","prediction_table",b"prediction_table","transformer_tables",b"transformer_tables","transformer_variables",b"transformer_variables"]) -> None: ... + prediction_table: google.protobuf.struct_pb2.Struct | None = ..., + transformer_tables: collections.abc.Iterable[google.protobuf.struct_pb2.Struct] | None = ..., + transformer_variables: collections.abc.Iterable[caraml.upi.v1.variable_pb2.Variable] | None = ..., + prediction_context: collections.abc.Iterable[caraml.upi.v1.variable_pb2.Variable] | None = ..., + headers: collections.abc.Iterable[caraml.upi.v1.header_pb2.Header] | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["prediction_table", b"prediction_table"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["headers", b"headers", "prediction_context", b"prediction_context", "prediction_table", b"prediction_table", "transformer_tables", b"transformer_tables", "transformer_variables", b"transformer_variables"]) -> None: ... + global___RouterInput = RouterInput +@typing_extensions.final class RouterOutput(google.protobuf.message.Message): """Output produced by router. These informations are extracted from the response produced by the router. """ + DESCRIPTOR: google.protobuf.descriptor.Descriptor + PREDICTION_RESULTS_TABLE_FIELD_NUMBER: builtins.int PREDICTION_CONTEXT_FIELD_NUMBER: builtins.int HEADERS_FIELD_NUMBER: builtins.int @@ -172,29 +176,26 @@ class RouterOutput(google.protobuf.message.Message): @property def prediction_results_table(self) -> google.protobuf.struct_pb2.Struct: """JSON-representation of prediction result table returned by router. "table_schema_version" field describe the encoding of this field.""" - pass @property def prediction_context(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[caraml.upi.v1.variable_pb2.Variable]: """Context of the prediction response.""" - pass @property def headers(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[caraml.upi.v1.header_pb2.Header]: """map containing response headers/metadata""" - pass status: builtins.int """grpc status of the response from model (see https://grpc.github.io/grpc/core/md_doc_statuscodes.html)""" - - message: typing.Text + message: builtins.str """grpc message""" - - def __init__(self, + def __init__( + self, *, - prediction_results_table: typing.Optional[google.protobuf.struct_pb2.Struct] = ..., - prediction_context: typing.Optional[typing.Iterable[caraml.upi.v1.variable_pb2.Variable]] = ..., - headers: typing.Optional[typing.Iterable[caraml.upi.v1.header_pb2.Header]] = ..., + prediction_results_table: google.protobuf.struct_pb2.Struct | None = ..., + prediction_context: collections.abc.Iterable[caraml.upi.v1.variable_pb2.Variable] | None = ..., + headers: collections.abc.Iterable[caraml.upi.v1.header_pb2.Header] | None = ..., status: builtins.int = ..., - message: typing.Text = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["prediction_results_table",b"prediction_results_table"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["headers",b"headers","message",b"message","prediction_context",b"prediction_context","prediction_results_table",b"prediction_results_table","status",b"status"]) -> None: ... + message: builtins.str = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["prediction_results_table", b"prediction_results_table"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["headers", b"headers", "message", b"message", "prediction_context", b"prediction_context", "prediction_results_table", b"prediction_results_table", "status", b"status"]) -> None: ... + global___RouterOutput = RouterOutput diff --git a/gen/python/grpc/caraml/upi/v1/router_log_pb2_grpc.pyi b/gen/python/grpc/caraml/upi/v1/router_log_pb2_grpc.pyi index f3a5a08..b13382f 100644 --- a/gen/python/grpc/caraml/upi/v1/router_log_pb2_grpc.pyi +++ b/gen/python/grpc/caraml/upi/v1/router_log_pb2_grpc.pyi @@ -2,3 +2,16 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ +import abc +import collections.abc +import grpc +import grpc.aio +import typing + +_T = typing.TypeVar('_T') + +class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): + ... + +class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore + ... diff --git a/gen/python/grpc/caraml/upi/v1/table_pb2.py b/gen/python/grpc/caraml/upi/v1/table_pb2.py index 89ae49d..0f7ba0a 100644 --- a/gen/python/grpc/caraml/upi/v1/table_pb2.py +++ b/gen/python/grpc/caraml/upi/v1/table_pb2.py @@ -4,9 +4,8 @@ """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 +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -17,50 +16,18 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19\x63\x61raml/upi/v1/table.proto\x12\rcaraml.upi.v1\x1a\x18\x63\x61raml/upi/v1/type.proto\"t\n\x05Table\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12/\n\x07\x63olumns\x18\x02 \x03(\x0b\x32\x15.caraml.upi.v1.ColumnR\x07\x63olumns\x12&\n\x04rows\x18\x03 \x03(\x0b\x32\x12.caraml.upi.v1.RowR\x04rows\"E\n\x06\x43olumn\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\'\n\x04type\x18\x02 \x01(\x0e\x32\x13.caraml.upi.v1.TypeR\x04type\"J\n\x03Row\x12\x15\n\x06row_id\x18\x01 \x01(\tR\x05rowId\x12,\n\x06values\x18\x02 \x03(\x0b\x32\x14.caraml.upi.v1.ValueR\x06values\"\x8b\x01\n\x05Value\x12!\n\x0c\x64ouble_value\x18\x01 \x01(\x01R\x0b\x64oubleValue\x12#\n\rinteger_value\x18\x02 \x01(\x03R\x0cintegerValue\x12!\n\x0cstring_value\x18\x03 \x01(\tR\x0bstringValue\x12\x17\n\x07is_null\x18\n \x01(\x08R\x06isNullB\xc6\x01\n\x11\x63om.caraml.upi.v1B\nTableProtoP\x01ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\xa2\x02\x03\x43UX\xaa\x02\rCaraml.Upi.V1\xca\x02\rCaraml\\Upi\\V1\xe2\x02\x19\x43\x61raml\\Upi\\V1\\GPBMetadata\xea\x02\x0f\x43\x61raml::Upi::V1b\x06proto3') - - -_TABLE = DESCRIPTOR.message_types_by_name['Table'] -_COLUMN = DESCRIPTOR.message_types_by_name['Column'] -_ROW = DESCRIPTOR.message_types_by_name['Row'] -_VALUE = DESCRIPTOR.message_types_by_name['Value'] -Table = _reflection.GeneratedProtocolMessageType('Table', (_message.Message,), { - 'DESCRIPTOR' : _TABLE, - '__module__' : 'caraml.upi.v1.table_pb2' - # @@protoc_insertion_point(class_scope:caraml.upi.v1.Table) - }) -_sym_db.RegisterMessage(Table) - -Column = _reflection.GeneratedProtocolMessageType('Column', (_message.Message,), { - 'DESCRIPTOR' : _COLUMN, - '__module__' : 'caraml.upi.v1.table_pb2' - # @@protoc_insertion_point(class_scope:caraml.upi.v1.Column) - }) -_sym_db.RegisterMessage(Column) - -Row = _reflection.GeneratedProtocolMessageType('Row', (_message.Message,), { - 'DESCRIPTOR' : _ROW, - '__module__' : 'caraml.upi.v1.table_pb2' - # @@protoc_insertion_point(class_scope:caraml.upi.v1.Row) - }) -_sym_db.RegisterMessage(Row) - -Value = _reflection.GeneratedProtocolMessageType('Value', (_message.Message,), { - 'DESCRIPTOR' : _VALUE, - '__module__' : 'caraml.upi.v1.table_pb2' - # @@protoc_insertion_point(class_scope:caraml.upi.v1.Value) - }) -_sym_db.RegisterMessage(Value) - +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'caraml.upi.v1.table_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\021com.caraml.upi.v1B\nTableProtoP\001ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\242\002\003CUX\252\002\rCaraml.Upi.V1\312\002\rCaraml\\Upi\\V1\342\002\031Caraml\\Upi\\V1\\GPBMetadata\352\002\017Caraml::Upi::V1' - _TABLE._serialized_start=70 - _TABLE._serialized_end=186 - _COLUMN._serialized_start=188 - _COLUMN._serialized_end=257 - _ROW._serialized_start=259 - _ROW._serialized_end=333 - _VALUE._serialized_start=336 - _VALUE._serialized_end=475 + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\021com.caraml.upi.v1B\nTableProtoP\001ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\242\002\003CUX\252\002\rCaraml.Upi.V1\312\002\rCaraml\\Upi\\V1\342\002\031Caraml\\Upi\\V1\\GPBMetadata\352\002\017Caraml::Upi::V1' + _globals['_TABLE']._serialized_start=70 + _globals['_TABLE']._serialized_end=186 + _globals['_COLUMN']._serialized_start=188 + _globals['_COLUMN']._serialized_end=257 + _globals['_ROW']._serialized_start=259 + _globals['_ROW']._serialized_end=333 + _globals['_VALUE']._serialized_start=336 + _globals['_VALUE']._serialized_end=475 # @@protoc_insertion_point(module_scope) diff --git a/gen/python/grpc/caraml/upi/v1/table_pb2.pyi b/gen/python/grpc/caraml/upi/v1/table_pb2.pyi index 201d537..ed021b1 100644 --- a/gen/python/grpc/caraml/upi/v1/table_pb2.pyi +++ b/gen/python/grpc/caraml/upi/v1/table_pb2.pyi @@ -4,108 +4,124 @@ isort:skip_file """ import builtins import caraml.upi.v1.type_pb2 +import collections.abc import google.protobuf.descriptor import google.protobuf.internal.containers import google.protobuf.message -import typing -import typing_extensions +import sys + +if sys.version_info >= (3, 8): + import typing as typing_extensions +else: + import typing_extensions DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing_extensions.final class Table(google.protobuf.message.Message): """Table represents a 2D data structure that has one or more columns with potentially different types """ + DESCRIPTOR: google.protobuf.descriptor.Descriptor + NAME_FIELD_NUMBER: builtins.int COLUMNS_FIELD_NUMBER: builtins.int ROWS_FIELD_NUMBER: builtins.int - name: typing.Text + name: builtins.str """Table's name""" - @property def columns(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Column]: """Columns stores schema informations of all columns in the table.""" - pass @property def rows(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Row]: """Rows stores list of row values in the table.""" - pass - def __init__(self, + def __init__( + self, *, - name: typing.Text = ..., - columns: typing.Optional[typing.Iterable[global___Column]] = ..., - rows: typing.Optional[typing.Iterable[global___Row]] = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["columns",b"columns","name",b"name","rows",b"rows"]) -> None: ... + name: builtins.str = ..., + columns: collections.abc.Iterable[global___Column] | None = ..., + rows: collections.abc.Iterable[global___Row] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["columns", b"columns", "name", b"name", "rows", b"rows"]) -> None: ... + global___Table = Table +@typing_extensions.final class Column(google.protobuf.message.Message): """Column represent a column definition within a table""" + DESCRIPTOR: google.protobuf.descriptor.Descriptor + NAME_FIELD_NUMBER: builtins.int TYPE_FIELD_NUMBER: builtins.int - name: typing.Text + name: builtins.str """Column's name""" - type: caraml.upi.v1.type_pb2.Type.ValueType """Column's type""" - - def __init__(self, + def __init__( + self, *, - name: typing.Text = ..., + name: builtins.str = ..., type: caraml.upi.v1.type_pb2.Type.ValueType = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["name",b"name","type",b"type"]) -> None: ... + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["name", b"name", "type", b"type"]) -> None: ... + global___Column = Column +@typing_extensions.final class Row(google.protobuf.message.Message): """Row represents list of value stored within a row of a table""" + DESCRIPTOR: google.protobuf.descriptor.Descriptor + ROW_ID_FIELD_NUMBER: builtins.int VALUES_FIELD_NUMBER: builtins.int - row_id: typing.Text + row_id: builtins.str """Id of the particular row in a table. The row id should be at least locally unique within the table. Row ID must be populated for prediction_table """ - @property def values(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Value]: """List of values within a row. It is table's creator responsibility to ensure that the number of entry values matches with the length of columns in the table. """ - pass - def __init__(self, + def __init__( + self, *, - row_id: typing.Text = ..., - values: typing.Optional[typing.Iterable[global___Value]] = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["row_id",b"row_id","values",b"values"]) -> None: ... + row_id: builtins.str = ..., + values: collections.abc.Iterable[global___Value] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["row_id", b"row_id", "values", b"values"]) -> None: ... + global___Row = Row +@typing_extensions.final class Value(google.protobuf.message.Message): """Value of a cell within a table. Value is nullable.""" + DESCRIPTOR: google.protobuf.descriptor.Descriptor + DOUBLE_VALUE_FIELD_NUMBER: builtins.int INTEGER_VALUE_FIELD_NUMBER: builtins.int STRING_VALUE_FIELD_NUMBER: builtins.int IS_NULL_FIELD_NUMBER: builtins.int double_value: builtins.float """One of following field will be set depending on the column's type""" - integer_value: builtins.int - string_value: typing.Text + string_value: builtins.str is_null: builtins.bool """Flag to be used to signify that the value is null""" - - def __init__(self, + def __init__( + self, *, double_value: builtins.float = ..., integer_value: builtins.int = ..., - string_value: typing.Text = ..., + string_value: builtins.str = ..., is_null: builtins.bool = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["double_value",b"double_value","integer_value",b"integer_value","is_null",b"is_null","string_value",b"string_value"]) -> None: ... + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["double_value", b"double_value", "integer_value", b"integer_value", "is_null", b"is_null", "string_value", b"string_value"]) -> None: ... + global___Value = Value diff --git a/gen/python/grpc/caraml/upi/v1/table_pb2_grpc.pyi b/gen/python/grpc/caraml/upi/v1/table_pb2_grpc.pyi index f3a5a08..b13382f 100644 --- a/gen/python/grpc/caraml/upi/v1/table_pb2_grpc.pyi +++ b/gen/python/grpc/caraml/upi/v1/table_pb2_grpc.pyi @@ -2,3 +2,16 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ +import abc +import collections.abc +import grpc +import grpc.aio +import typing + +_T = typing.TypeVar('_T') + +class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): + ... + +class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore + ... diff --git a/gen/python/grpc/caraml/upi/v1/type_pb2.py b/gen/python/grpc/caraml/upi/v1/type_pb2.py index 61ac9e7..90a362a 100644 --- a/gen/python/grpc/caraml/upi/v1/type_pb2.py +++ b/gen/python/grpc/caraml/upi/v1/type_pb2.py @@ -2,12 +2,10 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: caraml/upi/v1/type.proto """Generated protocol buffer code.""" -from google.protobuf.internal import enum_type_wrapper 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 +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -17,18 +15,12 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18\x63\x61raml/upi/v1/type.proto\x12\rcaraml.upi.v1*P\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bTYPE_DOUBLE\x10\x01\x12\x10\n\x0cTYPE_INTEGER\x10\x02\x12\x0f\n\x0bTYPE_STRING\x10\x03\x42\xc5\x01\n\x11\x63om.caraml.upi.v1B\tTypeProtoP\x01ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\xa2\x02\x03\x43UX\xaa\x02\rCaraml.Upi.V1\xca\x02\rCaraml\\Upi\\V1\xe2\x02\x19\x43\x61raml\\Upi\\V1\\GPBMetadata\xea\x02\x0f\x43\x61raml::Upi::V1b\x06proto3') -_TYPE = DESCRIPTOR.enum_types_by_name['Type'] -Type = enum_type_wrapper.EnumTypeWrapper(_TYPE) -TYPE_UNSPECIFIED = 0 -TYPE_DOUBLE = 1 -TYPE_INTEGER = 2 -TYPE_STRING = 3 - - +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'caraml.upi.v1.type_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\021com.caraml.upi.v1B\tTypeProtoP\001ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\242\002\003CUX\252\002\rCaraml.Upi.V1\312\002\rCaraml\\Upi\\V1\342\002\031Caraml\\Upi\\V1\\GPBMetadata\352\002\017Caraml::Upi::V1' - _TYPE._serialized_start=43 - _TYPE._serialized_end=123 + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\021com.caraml.upi.v1B\tTypeProtoP\001ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\242\002\003CUX\252\002\rCaraml.Upi.V1\312\002\rCaraml\\Upi\\V1\342\002\031Caraml\\Upi\\V1\\GPBMetadata\352\002\017Caraml::Upi::V1' + _globals['_TYPE']._serialized_start=43 + _globals['_TYPE']._serialized_end=123 # @@protoc_insertion_point(module_scope) diff --git a/gen/python/grpc/caraml/upi/v1/type_pb2.pyi b/gen/python/grpc/caraml/upi/v1/type_pb2.pyi index efccb8c..62b6f99 100644 --- a/gen/python/grpc/caraml/upi/v1/type_pb2.pyi +++ b/gen/python/grpc/caraml/upi/v1/type_pb2.pyi @@ -5,39 +5,38 @@ isort:skip_file import builtins import google.protobuf.descriptor import google.protobuf.internal.enum_type_wrapper +import sys import typing -import typing_extensions + +if sys.version_info >= (3, 10): + import typing as typing_extensions +else: + import typing_extensions DESCRIPTOR: google.protobuf.descriptor.FileDescriptor class _Type: - ValueType = typing.NewType('ValueType', builtins.int) + ValueType = typing.NewType("ValueType", builtins.int) V: typing_extensions.TypeAlias = ValueType + class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Type.ValueType], builtins.type): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor TYPE_UNSPECIFIED: _Type.ValueType # 0 TYPE_DOUBLE: _Type.ValueType # 1 """Double precision floating number (64-bit)""" - TYPE_INTEGER: _Type.ValueType # 2 """64-bit Integer""" - TYPE_STRING: _Type.ValueType # 3 """String""" class Type(_Type, metaclass=_TypeEnumTypeWrapper): """Type supported by UPI""" - pass TYPE_UNSPECIFIED: Type.ValueType # 0 TYPE_DOUBLE: Type.ValueType # 1 """Double precision floating number (64-bit)""" - TYPE_INTEGER: Type.ValueType # 2 """64-bit Integer""" - TYPE_STRING: Type.ValueType # 3 """String""" - global___Type = Type - diff --git a/gen/python/grpc/caraml/upi/v1/type_pb2_grpc.pyi b/gen/python/grpc/caraml/upi/v1/type_pb2_grpc.pyi index f3a5a08..b13382f 100644 --- a/gen/python/grpc/caraml/upi/v1/type_pb2_grpc.pyi +++ b/gen/python/grpc/caraml/upi/v1/type_pb2_grpc.pyi @@ -2,3 +2,16 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ +import abc +import collections.abc +import grpc +import grpc.aio +import typing + +_T = typing.TypeVar('_T') + +class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): + ... + +class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore + ... diff --git a/gen/python/grpc/caraml/upi/v1/upi_pb2.py b/gen/python/grpc/caraml/upi/v1/upi_pb2.py index edcbe13..77e6251 100644 --- a/gen/python/grpc/caraml/upi/v1/upi_pb2.py +++ b/gen/python/grpc/caraml/upi/v1/upi_pb2.py @@ -4,9 +4,8 @@ """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 +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -18,77 +17,28 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17\x63\x61raml/upi/v1/upi.proto\x12\rcaraml.upi.v1\x1a\x1c\x63\x61raml/upi/v1/variable.proto\x1a\x19\x63\x61raml/upi/v1/table.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto\"\xca\x02\n\x14PredictValuesRequest\x12?\n\x10prediction_table\x18\x01 \x01(\x0b\x32\x14.caraml.upi.v1.TableR\x0fpredictionTable\x12L\n\x11transformer_input\x18\x04 \x01(\x0b\x32\x1f.caraml.upi.v1.TransformerInputR\x10transformerInput\x12\x1f\n\x0btarget_name\x18\x02 \x01(\tR\ntargetName\x12\x46\n\x12prediction_context\x18\x03 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\x11predictionContext\x12:\n\x08metadata\x18\n \x01(\x0b\x32\x1e.caraml.upi.v1.RequestMetadataR\x08metadata\"\x7f\n\x0fRequestMetadata\x12#\n\rprediction_id\x18\x01 \x01(\tR\x0cpredictionId\x12G\n\x11request_timestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x10requestTimestamp\"\x8b\x02\n\x15PredictValuesResponse\x12L\n\x17prediction_result_table\x18\x01 \x01(\x0b\x32\x14.caraml.upi.v1.TableR\x15predictionResultTable\x12\x1f\n\x0btarget_name\x18\x02 \x01(\tR\ntargetName\x12\x46\n\x12prediction_context\x18\x03 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\x11predictionContext\x12;\n\x08metadata\x18\n \x01(\x0b\x32\x1f.caraml.upi.v1.ResponseMetadataR\x08metadata\"\xbd\x01\n\x10ResponseMetadata\x12#\n\rprediction_id\x18\x01 \x01(\tR\x0cpredictionId\x12\x34\n\x06models\x18\x02 \x03(\x0b\x32\x1c.caraml.upi.v1.ModelMetadataR\x06models\x12\'\n\x0f\x65xperiment_name\x18\x03 \x01(\tR\x0e\x65xperimentName\x12%\n\x0etreatment_name\x18\x04 \x01(\tR\rtreatmentName\"=\n\rModelMetadata\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n\x07version\x18\x02 \x01(\tR\x07version\"w\n\x10TransformerInput\x12,\n\x06tables\x18\x01 \x03(\x0b\x32\x14.caraml.upi.v1.TableR\x06tables\x12\x35\n\tvariables\x18\x02 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\tvariables2\x90\x01\n\x1aUniversalPredictionService\x12r\n\rPredictValues\x12#.caraml.upi.v1.PredictValuesRequest\x1a$.caraml.upi.v1.PredictValuesResponse\"\x16\x82\xd3\xe4\x93\x02\x10:\x01*\"\x0b/v1/predictB\xc4\x01\n\x11\x63om.caraml.upi.v1B\x08UpiProtoP\x01ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\xa2\x02\x03\x43UX\xaa\x02\rCaraml.Upi.V1\xca\x02\rCaraml\\Upi\\V1\xe2\x02\x19\x43\x61raml\\Upi\\V1\\GPBMetadata\xea\x02\x0f\x43\x61raml::Upi::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17\x63\x61raml/upi/v1/upi.proto\x12\rcaraml.upi.v1\x1a\x1c\x63\x61raml/upi/v1/variable.proto\x1a\x19\x63\x61raml/upi/v1/table.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto\"\xca\x02\n\x14PredictValuesRequest\x12?\n\x10prediction_table\x18\x01 \x01(\x0b\x32\x14.caraml.upi.v1.TableR\x0fpredictionTable\x12L\n\x11transformer_input\x18\x04 \x01(\x0b\x32\x1f.caraml.upi.v1.TransformerInputR\x10transformerInput\x12\x1f\n\x0btarget_name\x18\x02 \x01(\tR\ntargetName\x12\x46\n\x12prediction_context\x18\x03 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\x11predictionContext\x12:\n\x08metadata\x18\n \x01(\x0b\x32\x1e.caraml.upi.v1.RequestMetadataR\x08metadata\"\x7f\n\x0fRequestMetadata\x12#\n\rprediction_id\x18\x01 \x01(\tR\x0cpredictionId\x12G\n\x11request_timestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x10requestTimestamp\"\x8b\x02\n\x15PredictValuesResponse\x12L\n\x17prediction_result_table\x18\x01 \x01(\x0b\x32\x14.caraml.upi.v1.TableR\x15predictionResultTable\x12\x1f\n\x0btarget_name\x18\x02 \x01(\tR\ntargetName\x12\x46\n\x12prediction_context\x18\x03 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\x11predictionContext\x12;\n\x08metadata\x18\n \x01(\x0b\x32\x1f.caraml.upi.v1.ResponseMetadataR\x08metadata\"\xbd\x01\n\x10ResponseMetadata\x12#\n\rprediction_id\x18\x01 \x01(\tR\x0cpredictionId\x12\x34\n\x06models\x18\x02 \x03(\x0b\x32\x1c.caraml.upi.v1.ModelMetadataR\x06models\x12\'\n\x0f\x65xperiment_name\x18\x03 \x01(\tR\x0e\x65xperimentName\x12%\n\x0etreatment_name\x18\x04 \x01(\tR\rtreatmentName\"=\n\rModelMetadata\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n\x07version\x18\x02 \x01(\tR\x07version\"w\n\x10TransformerInput\x12,\n\x06tables\x18\x01 \x03(\x0b\x32\x14.caraml.upi.v1.TableR\x06tables\x12\x35\n\tvariables\x18\x02 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\tvariables2\x90\x01\n\x1aUniversalPredictionService\x12r\n\rPredictValues\x12#.caraml.upi.v1.PredictValuesRequest\x1a$.caraml.upi.v1.PredictValuesResponse\"\x16\x82\xd3\xe4\x93\x02\x10\"\x0b/v1/predict:\x01*B\xc4\x01\n\x11\x63om.caraml.upi.v1B\x08UpiProtoP\x01ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\xa2\x02\x03\x43UX\xaa\x02\rCaraml.Upi.V1\xca\x02\rCaraml\\Upi\\V1\xe2\x02\x19\x43\x61raml\\Upi\\V1\\GPBMetadata\xea\x02\x0f\x43\x61raml::Upi::V1b\x06proto3') - - -_PREDICTVALUESREQUEST = DESCRIPTOR.message_types_by_name['PredictValuesRequest'] -_REQUESTMETADATA = DESCRIPTOR.message_types_by_name['RequestMetadata'] -_PREDICTVALUESRESPONSE = DESCRIPTOR.message_types_by_name['PredictValuesResponse'] -_RESPONSEMETADATA = DESCRIPTOR.message_types_by_name['ResponseMetadata'] -_MODELMETADATA = DESCRIPTOR.message_types_by_name['ModelMetadata'] -_TRANSFORMERINPUT = DESCRIPTOR.message_types_by_name['TransformerInput'] -PredictValuesRequest = _reflection.GeneratedProtocolMessageType('PredictValuesRequest', (_message.Message,), { - 'DESCRIPTOR' : _PREDICTVALUESREQUEST, - '__module__' : 'caraml.upi.v1.upi_pb2' - # @@protoc_insertion_point(class_scope:caraml.upi.v1.PredictValuesRequest) - }) -_sym_db.RegisterMessage(PredictValuesRequest) - -RequestMetadata = _reflection.GeneratedProtocolMessageType('RequestMetadata', (_message.Message,), { - 'DESCRIPTOR' : _REQUESTMETADATA, - '__module__' : 'caraml.upi.v1.upi_pb2' - # @@protoc_insertion_point(class_scope:caraml.upi.v1.RequestMetadata) - }) -_sym_db.RegisterMessage(RequestMetadata) - -PredictValuesResponse = _reflection.GeneratedProtocolMessageType('PredictValuesResponse', (_message.Message,), { - 'DESCRIPTOR' : _PREDICTVALUESRESPONSE, - '__module__' : 'caraml.upi.v1.upi_pb2' - # @@protoc_insertion_point(class_scope:caraml.upi.v1.PredictValuesResponse) - }) -_sym_db.RegisterMessage(PredictValuesResponse) - -ResponseMetadata = _reflection.GeneratedProtocolMessageType('ResponseMetadata', (_message.Message,), { - 'DESCRIPTOR' : _RESPONSEMETADATA, - '__module__' : 'caraml.upi.v1.upi_pb2' - # @@protoc_insertion_point(class_scope:caraml.upi.v1.ResponseMetadata) - }) -_sym_db.RegisterMessage(ResponseMetadata) - -ModelMetadata = _reflection.GeneratedProtocolMessageType('ModelMetadata', (_message.Message,), { - 'DESCRIPTOR' : _MODELMETADATA, - '__module__' : 'caraml.upi.v1.upi_pb2' - # @@protoc_insertion_point(class_scope:caraml.upi.v1.ModelMetadata) - }) -_sym_db.RegisterMessage(ModelMetadata) - -TransformerInput = _reflection.GeneratedProtocolMessageType('TransformerInput', (_message.Message,), { - 'DESCRIPTOR' : _TRANSFORMERINPUT, - '__module__' : 'caraml.upi.v1.upi_pb2' - # @@protoc_insertion_point(class_scope:caraml.upi.v1.TransformerInput) - }) -_sym_db.RegisterMessage(TransformerInput) - -_UNIVERSALPREDICTIONSERVICE = DESCRIPTOR.services_by_name['UniversalPredictionService'] +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'caraml.upi.v1.upi_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\021com.caraml.upi.v1B\010UpiProtoP\001ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\242\002\003CUX\252\002\rCaraml.Upi.V1\312\002\rCaraml\\Upi\\V1\342\002\031Caraml\\Upi\\V1\\GPBMetadata\352\002\017Caraml::Upi::V1' - _UNIVERSALPREDICTIONSERVICE.methods_by_name['PredictValues']._options = None - _UNIVERSALPREDICTIONSERVICE.methods_by_name['PredictValues']._serialized_options = b'\202\323\344\223\002\020:\001*\"\013/v1/predict' - _PREDICTVALUESREQUEST._serialized_start=163 - _PREDICTVALUESREQUEST._serialized_end=493 - _REQUESTMETADATA._serialized_start=495 - _REQUESTMETADATA._serialized_end=622 - _PREDICTVALUESRESPONSE._serialized_start=625 - _PREDICTVALUESRESPONSE._serialized_end=892 - _RESPONSEMETADATA._serialized_start=895 - _RESPONSEMETADATA._serialized_end=1084 - _MODELMETADATA._serialized_start=1086 - _MODELMETADATA._serialized_end=1147 - _TRANSFORMERINPUT._serialized_start=1149 - _TRANSFORMERINPUT._serialized_end=1268 - _UNIVERSALPREDICTIONSERVICE._serialized_start=1271 - _UNIVERSALPREDICTIONSERVICE._serialized_end=1415 + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\021com.caraml.upi.v1B\010UpiProtoP\001ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\242\002\003CUX\252\002\rCaraml.Upi.V1\312\002\rCaraml\\Upi\\V1\342\002\031Caraml\\Upi\\V1\\GPBMetadata\352\002\017Caraml::Upi::V1' + _globals['_UNIVERSALPREDICTIONSERVICE'].methods_by_name['PredictValues']._options = None + _globals['_UNIVERSALPREDICTIONSERVICE'].methods_by_name['PredictValues']._serialized_options = b'\202\323\344\223\002\020\"\013/v1/predict:\001*' + _globals['_PREDICTVALUESREQUEST']._serialized_start=163 + _globals['_PREDICTVALUESREQUEST']._serialized_end=493 + _globals['_REQUESTMETADATA']._serialized_start=495 + _globals['_REQUESTMETADATA']._serialized_end=622 + _globals['_PREDICTVALUESRESPONSE']._serialized_start=625 + _globals['_PREDICTVALUESRESPONSE']._serialized_end=892 + _globals['_RESPONSEMETADATA']._serialized_start=895 + _globals['_RESPONSEMETADATA']._serialized_end=1084 + _globals['_MODELMETADATA']._serialized_start=1086 + _globals['_MODELMETADATA']._serialized_end=1147 + _globals['_TRANSFORMERINPUT']._serialized_start=1149 + _globals['_TRANSFORMERINPUT']._serialized_end=1268 + _globals['_UNIVERSALPREDICTIONSERVICE']._serialized_start=1271 + _globals['_UNIVERSALPREDICTIONSERVICE']._serialized_end=1415 # @@protoc_insertion_point(module_scope) diff --git a/gen/python/grpc/caraml/upi/v1/upi_pb2.pyi b/gen/python/grpc/caraml/upi/v1/upi_pb2.pyi index d23c110..b117f01 100644 --- a/gen/python/grpc/caraml/upi/v1/upi_pb2.pyi +++ b/gen/python/grpc/caraml/upi/v1/upi_pb2.pyi @@ -5,18 +5,26 @@ isort:skip_file import builtins import caraml.upi.v1.table_pb2 import caraml.upi.v1.variable_pb2 +import collections.abc import google.protobuf.descriptor import google.protobuf.internal.containers import google.protobuf.message import google.protobuf.timestamp_pb2 -import typing -import typing_extensions +import sys + +if sys.version_info >= (3, 8): + import typing as typing_extensions +else: + import typing_extensions DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing_extensions.final class PredictValuesRequest(google.protobuf.message.Message): """Represents a request to predict multiple values""" + DESCRIPTOR: google.protobuf.descriptor.Descriptor + PREDICTION_TABLE_FIELD_NUMBER: builtins.int TRANSFORMER_INPUT_FIELD_NUMBER: builtins.int TARGET_NAME_FIELD_NUMBER: builtins.int @@ -40,7 +48,6 @@ class PredictValuesRequest(google.protobuf.message.Message): and observations can be joined. NOTE: the ordering of rows might differ in the response but the number of row must remain the same. """ - pass @property def transformer_input(self) -> global___TransformerInput: """Transformer input contains list of tables and variables that can be used to enrich prediction_table using transformer. @@ -48,12 +55,10 @@ class PredictValuesRequest(google.protobuf.message.Message): - unprocessed/raw features that requires further transformation. - list of entities for which their precomputed features are retrieved from feature store using standard transformer. """ - pass - target_name: typing.Text + target_name: builtins.str """Name of the concept we wish to predict. For example in context of iris classification problem it can be "iris-species" """ - @property def prediction_context(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[caraml.upi.v1.variable_pb2.Variable]: """Prediction context may contain additional data applicable to all prediction instances @@ -61,28 +66,30 @@ class PredictValuesRequest(google.protobuf.message.Message): or tracking purposes. Eg. country_code, service_type, service_area_id """ - pass @property def metadata(self) -> global___RequestMetadata: """Request metadata""" - pass - def __init__(self, + def __init__( + self, *, - prediction_table: typing.Optional[caraml.upi.v1.table_pb2.Table] = ..., - transformer_input: typing.Optional[global___TransformerInput] = ..., - target_name: typing.Text = ..., - prediction_context: typing.Optional[typing.Iterable[caraml.upi.v1.variable_pb2.Variable]] = ..., - metadata: typing.Optional[global___RequestMetadata] = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["metadata",b"metadata","prediction_table",b"prediction_table","transformer_input",b"transformer_input"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["metadata",b"metadata","prediction_context",b"prediction_context","prediction_table",b"prediction_table","target_name",b"target_name","transformer_input",b"transformer_input"]) -> None: ... + prediction_table: caraml.upi.v1.table_pb2.Table | None = ..., + transformer_input: global___TransformerInput | None = ..., + target_name: builtins.str = ..., + prediction_context: collections.abc.Iterable[caraml.upi.v1.variable_pb2.Variable] | None = ..., + metadata: global___RequestMetadata | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["metadata", b"metadata", "prediction_table", b"prediction_table", "transformer_input", b"transformer_input"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["metadata", b"metadata", "prediction_context", b"prediction_context", "prediction_table", b"prediction_table", "target_name", b"target_name", "transformer_input", b"transformer_input"]) -> None: ... + global___PredictValuesRequest = PredictValuesRequest +@typing_extensions.final class RequestMetadata(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + PREDICTION_ID_FIELD_NUMBER: builtins.int REQUEST_TIMESTAMP_FIELD_NUMBER: builtins.int - prediction_id: typing.Text + prediction_id: builtins.str """Unique identifier for each request. Optional. Prediction ID will generated by the platform. The user is expected include the prediction ID (along with row ID) when calling @@ -92,22 +99,24 @@ class RequestMetadata(google.protobuf.message.Message): If there are experiments with alternative models, the mapping from prediciton ID to treatment ID will be logged by the platform """ - @property def request_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: """Timestamp of the request""" - pass - def __init__(self, + def __init__( + self, *, - prediction_id: typing.Text = ..., - request_timestamp: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["request_timestamp",b"request_timestamp"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["prediction_id",b"prediction_id","request_timestamp",b"request_timestamp"]) -> None: ... + prediction_id: builtins.str = ..., + request_timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["request_timestamp", b"request_timestamp"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["prediction_id", b"prediction_id", "request_timestamp", b"request_timestamp"]) -> None: ... + global___RequestMetadata = RequestMetadata +@typing_extensions.final class PredictValuesResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + PREDICTION_RESULT_TABLE_FIELD_NUMBER: builtins.int TARGET_NAME_FIELD_NUMBER: builtins.int PREDICTION_CONTEXT_FIELD_NUMBER: builtins.int @@ -118,36 +127,36 @@ class PredictValuesResponse(google.protobuf.message.Message): prediction rows provided in the request. NOTE: the ordering of prediction_result_rows might differ with prediction_table in the request but the number of row must match with the prediction_table """ - pass - target_name: typing.Text + target_name: builtins.str """Target name as defined in the request metadata""" - @property def prediction_context(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[caraml.upi.v1.variable_pb2.Variable]: """Extensible field to cover unforeseen requirements""" - pass @property def metadata(self) -> global___ResponseMetadata: """Response metadata""" - pass - def __init__(self, + def __init__( + self, *, - prediction_result_table: typing.Optional[caraml.upi.v1.table_pb2.Table] = ..., - target_name: typing.Text = ..., - prediction_context: typing.Optional[typing.Iterable[caraml.upi.v1.variable_pb2.Variable]] = ..., - metadata: typing.Optional[global___ResponseMetadata] = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["metadata",b"metadata","prediction_result_table",b"prediction_result_table"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["metadata",b"metadata","prediction_context",b"prediction_context","prediction_result_table",b"prediction_result_table","target_name",b"target_name"]) -> None: ... + prediction_result_table: caraml.upi.v1.table_pb2.Table | None = ..., + target_name: builtins.str = ..., + prediction_context: collections.abc.Iterable[caraml.upi.v1.variable_pb2.Variable] | None = ..., + metadata: global___ResponseMetadata | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["metadata", b"metadata", "prediction_result_table", b"prediction_result_table"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["metadata", b"metadata", "prediction_context", b"prediction_context", "prediction_result_table", b"prediction_result_table", "target_name", b"target_name"]) -> None: ... + global___PredictValuesResponse = PredictValuesResponse +@typing_extensions.final class ResponseMetadata(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + PREDICTION_ID_FIELD_NUMBER: builtins.int MODELS_FIELD_NUMBER: builtins.int EXPERIMENT_NAME_FIELD_NUMBER: builtins.int TREATMENT_NAME_FIELD_NUMBER: builtins.int - prediction_id: typing.Text + prediction_id: builtins.str """Prediction ID generated by the platform. The user is expected include the prediction ID (along with row ID) when calling the observations API so that predictions and observations can be joined. @@ -156,56 +165,59 @@ class ResponseMetadata(google.protobuf.message.Message): If there are experiments with alternative models, the mapping from prediciton ID to treatment ID will be logged by the platform """ - @property def models(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ModelMetadata]: """List of model that produces the prediction This field is repeated to cater for use case such as ensembling several model production results """ - pass - experiment_name: typing.Text + experiment_name: builtins.str """Name of the experiment that is used to produce the response The value might be empty if experimentation is not involved to produce response """ - - treatment_name: typing.Text + treatment_name: builtins.str """Name of the treatment chosen from the experiment to produce the response The value might be empty if experimentation is not involved to produce response """ - - def __init__(self, + def __init__( + self, *, - prediction_id: typing.Text = ..., - models: typing.Optional[typing.Iterable[global___ModelMetadata]] = ..., - experiment_name: typing.Text = ..., - treatment_name: typing.Text = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["experiment_name",b"experiment_name","models",b"models","prediction_id",b"prediction_id","treatment_name",b"treatment_name"]) -> None: ... + prediction_id: builtins.str = ..., + models: collections.abc.Iterable[global___ModelMetadata] | None = ..., + experiment_name: builtins.str = ..., + treatment_name: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["experiment_name", b"experiment_name", "models", b"models", "prediction_id", b"prediction_id", "treatment_name", b"treatment_name"]) -> None: ... + global___ResponseMetadata = ResponseMetadata +@typing_extensions.final class ModelMetadata(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + NAME_FIELD_NUMBER: builtins.int VERSION_FIELD_NUMBER: builtins.int - name: typing.Text + name: builtins.str """Model name that produce prediction""" - - version: typing.Text + version: builtins.str """Model version that produce prediction""" - - def __init__(self, + def __init__( + self, *, - name: typing.Text = ..., - version: typing.Text = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["name",b"name","version",b"version"]) -> None: ... + name: builtins.str = ..., + version: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["name", b"name", "version", b"version"]) -> None: ... + global___ModelMetadata = ModelMetadata +@typing_extensions.final class TransformerInput(google.protobuf.message.Message): """Transformer input contains additional information that can be used to enrich prediction_table using standard transformer. All tables and variables within transformer input will be imported to the standard transformer runtime automatically. """ + DESCRIPTOR: google.protobuf.descriptor.Descriptor + TABLES_FIELD_NUMBER: builtins.int VARIABLES_FIELD_NUMBER: builtins.int @property @@ -214,15 +226,15 @@ class TransformerInput(google.protobuf.message.Message): All tables must have unique name. Each table doesn't need to have same number of row. """ - pass @property def variables(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[caraml.upi.v1.variable_pb2.Variable]: """List of variables""" - pass - def __init__(self, + def __init__( + self, *, - tables: typing.Optional[typing.Iterable[caraml.upi.v1.table_pb2.Table]] = ..., - variables: typing.Optional[typing.Iterable[caraml.upi.v1.variable_pb2.Variable]] = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["tables",b"tables","variables",b"variables"]) -> None: ... + tables: collections.abc.Iterable[caraml.upi.v1.table_pb2.Table] | None = ..., + variables: collections.abc.Iterable[caraml.upi.v1.variable_pb2.Variable] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["tables", b"tables", "variables", b"variables"]) -> None: ... + global___TransformerInput = TransformerInput diff --git a/gen/python/grpc/caraml/upi/v1/upi_pb2_grpc.pyi b/gen/python/grpc/caraml/upi/v1/upi_pb2_grpc.pyi index d3aba9c..1ce8832 100644 --- a/gen/python/grpc/caraml/upi/v1/upi_pb2_grpc.pyi +++ b/gen/python/grpc/caraml/upi/v1/upi_pb2_grpc.pyi @@ -4,23 +4,44 @@ isort:skip_file """ import abc import caraml.upi.v1.upi_pb2 +import collections.abc import grpc +import grpc.aio +import typing + +_T = typing.TypeVar('_T') + +class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): + ... + +class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore + ... class UniversalPredictionServiceStub: """Service for performing model prediction""" - def __init__(self, channel: grpc.Channel) -> None: ... + + def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ... PredictValues: grpc.UnaryUnaryMultiCallable[ caraml.upi.v1.upi_pb2.PredictValuesRequest, - caraml.upi.v1.upi_pb2.PredictValuesResponse] + caraml.upi.v1.upi_pb2.PredictValuesResponse, + ] +class UniversalPredictionServiceAsyncStub: + """Service for performing model prediction""" + + PredictValues: grpc.aio.UnaryUnaryMultiCallable[ + caraml.upi.v1.upi_pb2.PredictValuesRequest, + caraml.upi.v1.upi_pb2.PredictValuesResponse, + ] class UniversalPredictionServiceServicer(metaclass=abc.ABCMeta): """Service for performing model prediction""" + @abc.abstractmethod - def PredictValues(self, + def PredictValues( + self, request: caraml.upi.v1.upi_pb2.PredictValuesRequest, - context: grpc.ServicerContext, - ) -> caraml.upi.v1.upi_pb2.PredictValuesResponse: ... - + context: _ServicerContext, + ) -> typing.Union[caraml.upi.v1.upi_pb2.PredictValuesResponse, collections.abc.Awaitable[caraml.upi.v1.upi_pb2.PredictValuesResponse]]: ... -def add_UniversalPredictionServiceServicer_to_server(servicer: UniversalPredictionServiceServicer, server: grpc.Server) -> None: ... +def add_UniversalPredictionServiceServicer_to_server(servicer: UniversalPredictionServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ... diff --git a/gen/python/grpc/caraml/upi/v1/variable_pb2.py b/gen/python/grpc/caraml/upi/v1/variable_pb2.py index e6a958b..4d07020 100644 --- a/gen/python/grpc/caraml/upi/v1/variable_pb2.py +++ b/gen/python/grpc/caraml/upi/v1/variable_pb2.py @@ -4,9 +4,8 @@ """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 +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -17,20 +16,12 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x63\x61raml/upi/v1/variable.proto\x12\rcaraml.upi.v1\x1a\x18\x63\x61raml/upi/v1/type.proto\"\xb2\x01\n\x08Variable\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\'\n\x04type\x18\x02 \x01(\x0e\x32\x13.caraml.upi.v1.TypeR\x04type\x12!\n\x0c\x64ouble_value\x18\x03 \x01(\x01R\x0b\x64oubleValue\x12#\n\rinteger_value\x18\x04 \x01(\x03R\x0cintegerValue\x12!\n\x0cstring_value\x18\x05 \x01(\tR\x0bstringValueB\xc9\x01\n\x11\x63om.caraml.upi.v1B\rVariableProtoP\x01ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\xa2\x02\x03\x43UX\xaa\x02\rCaraml.Upi.V1\xca\x02\rCaraml\\Upi\\V1\xe2\x02\x19\x43\x61raml\\Upi\\V1\\GPBMetadata\xea\x02\x0f\x43\x61raml::Upi::V1b\x06proto3') - - -_VARIABLE = DESCRIPTOR.message_types_by_name['Variable'] -Variable = _reflection.GeneratedProtocolMessageType('Variable', (_message.Message,), { - 'DESCRIPTOR' : _VARIABLE, - '__module__' : 'caraml.upi.v1.variable_pb2' - # @@protoc_insertion_point(class_scope:caraml.upi.v1.Variable) - }) -_sym_db.RegisterMessage(Variable) - +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'caraml.upi.v1.variable_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\021com.caraml.upi.v1B\rVariableProtoP\001ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\242\002\003CUX\252\002\rCaraml.Upi.V1\312\002\rCaraml\\Upi\\V1\342\002\031Caraml\\Upi\\V1\\GPBMetadata\352\002\017Caraml::Upi::V1' - _VARIABLE._serialized_start=74 - _VARIABLE._serialized_end=252 + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\021com.caraml.upi.v1B\rVariableProtoP\001ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\242\002\003CUX\252\002\rCaraml.Upi.V1\312\002\rCaraml\\Upi\\V1\342\002\031Caraml\\Upi\\V1\\GPBMetadata\352\002\017Caraml::Upi::V1' + _globals['_VARIABLE']._serialized_start=74 + _globals['_VARIABLE']._serialized_end=252 # @@protoc_insertion_point(module_scope) diff --git a/gen/python/grpc/caraml/upi/v1/variable_pb2.pyi b/gen/python/grpc/caraml/upi/v1/variable_pb2.pyi index c33fa35..de49863 100644 --- a/gen/python/grpc/caraml/upi/v1/variable_pb2.pyi +++ b/gen/python/grpc/caraml/upi/v1/variable_pb2.pyi @@ -6,45 +6,51 @@ import builtins import caraml.upi.v1.type_pb2 import google.protobuf.descriptor import google.protobuf.message -import typing -import typing_extensions +import sys + +if sys.version_info >= (3, 8): + import typing as typing_extensions +else: + import typing_extensions DESCRIPTOR: google.protobuf.descriptor.FileDescriptor +@typing_extensions.final class Variable(google.protobuf.message.Message): """Represents a named and typed data point. Can be used as a prediction input, output or metadata. Oneof types are avoided as these can be difficult to handle """ + DESCRIPTOR: google.protobuf.descriptor.Descriptor + NAME_FIELD_NUMBER: builtins.int TYPE_FIELD_NUMBER: builtins.int DOUBLE_VALUE_FIELD_NUMBER: builtins.int INTEGER_VALUE_FIELD_NUMBER: builtins.int STRING_VALUE_FIELD_NUMBER: builtins.int - name: typing.Text + name: builtins.str """Name describing what the value represents. Uses include: - Ensuring ML models process columns in the correct order - Defining a Feast row entity name - Parsing metadata to apply traffic rules """ - type: caraml.upi.v1.type_pb2.Type.ValueType """Type of the variable""" - double_value: builtins.float """One of the following field will be set depending on the type""" - integer_value: builtins.int - string_value: typing.Text - def __init__(self, + string_value: builtins.str + def __init__( + self, *, - name: typing.Text = ..., + name: builtins.str = ..., type: caraml.upi.v1.type_pb2.Type.ValueType = ..., double_value: builtins.float = ..., integer_value: builtins.int = ..., - string_value: typing.Text = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["double_value",b"double_value","integer_value",b"integer_value","name",b"name","string_value",b"string_value","type",b"type"]) -> None: ... + string_value: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["double_value", b"double_value", "integer_value", b"integer_value", "name", b"name", "string_value", b"string_value", "type", b"type"]) -> None: ... + global___Variable = Variable diff --git a/gen/python/grpc/caraml/upi/v1/variable_pb2_grpc.pyi b/gen/python/grpc/caraml/upi/v1/variable_pb2_grpc.pyi index f3a5a08..b13382f 100644 --- a/gen/python/grpc/caraml/upi/v1/variable_pb2_grpc.pyi +++ b/gen/python/grpc/caraml/upi/v1/variable_pb2_grpc.pyi @@ -2,3 +2,16 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ +import abc +import collections.abc +import grpc +import grpc.aio +import typing + +_T = typing.TypeVar('_T') + +class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): + ... + +class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore + ... diff --git a/gen/ruby/grpc/caraml/upi/v1/header_pb.rb b/gen/ruby/grpc/caraml/upi/v1/header_pb.rb index 61a03ec..e352c74 100644 --- a/gen/ruby/grpc/caraml/upi/v1/header_pb.rb +++ b/gen/ruby/grpc/caraml/upi/v1/header_pb.rb @@ -1,15 +1,34 @@ +# frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! # source: caraml/upi/v1/header.proto require 'google/protobuf' -Google::Protobuf::DescriptorPool.generated_pool.build do - add_file("caraml/upi/v1/header.proto", :syntax => :proto3) do - add_message "caraml.upi.v1.Header" do - optional :key, :string, 1, json_name: "key" - optional :value, :string, 2, json_name: "value" + +descriptor_data = "\n\x1a\x63\x61raml/upi/v1/header.proto\x12\rcaraml.upi.v1\"0\n\x06Header\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05valueB\xc7\x01\n\x11\x63om.caraml.upi.v1B\x0bHeaderProtoP\x01ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\xa2\x02\x03\x43UX\xaa\x02\rCaraml.Upi.V1\xca\x02\rCaraml\\Upi\\V1\xe2\x02\x19\x43\x61raml\\Upi\\V1\\GPBMetadata\xea\x02\x0f\x43\x61raml::Upi::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError => e + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" end end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." end module Caraml diff --git a/gen/ruby/grpc/caraml/upi/v1/observation_log_pb.rb b/gen/ruby/grpc/caraml/upi/v1/observation_log_pb.rb index 7a7cc8c..420b169 100644 --- a/gen/ruby/grpc/caraml/upi/v1/observation_log_pb.rb +++ b/gen/ruby/grpc/caraml/upi/v1/observation_log_pb.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! # source: caraml/upi/v1/observation_log.proto @@ -7,28 +8,33 @@ require 'google/protobuf/timestamp_pb' require 'google/api/annotations_pb' -Google::Protobuf::DescriptorPool.generated_pool.build do - add_file("caraml/upi/v1/observation_log.proto", :syntax => :proto3) do - add_message "caraml.upi.v1.ObservationLogKey" do - optional :observation_batch_id, :string, 1, json_name: "observationBatchId" - optional :prediction_id, :string, 2, json_name: "predictionId" - optional :row_id, :string, 3, json_name: "rowId" - end - add_message "caraml.upi.v1.ObservationLog" do - optional :prediction_id, :string, 1, json_name: "predictionId" - optional :row_id, :string, 2, json_name: "rowId" - optional :target_name, :string, 3, json_name: "targetName" - repeated :observation_values, :message, 4, "caraml.upi.v1.Variable", json_name: "observationValues" - repeated :observation_context, :message, 5, "caraml.upi.v1.Variable", json_name: "observationContext" - optional :observation_timestamp, :message, 6, "google.protobuf.Timestamp", json_name: "observationTimestamp" - end - add_message "caraml.upi.v1.LogObservationsRequest" do - repeated :observations, :message, 1, "caraml.upi.v1.ObservationLog", json_name: "observations" - end - add_message "caraml.upi.v1.LogObservationsResponse" do - optional :observation_batch_id, :string, 1, json_name: "observationBatchId" + +descriptor_data = "\n#caraml/upi/v1/observation_log.proto\x12\rcaraml.upi.v1\x1a\x1c\x63\x61raml/upi/v1/variable.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto\"\x81\x01\n\x11ObservationLogKey\x12\x30\n\x14observation_batch_id\x18\x01 \x01(\tR\x12observationBatchId\x12#\n\rprediction_id\x18\x02 \x01(\tR\x0cpredictionId\x12\x15\n\x06row_id\x18\x03 \x01(\tR\x05rowId\"\xd0\x02\n\x0eObservationLog\x12#\n\rprediction_id\x18\x01 \x01(\tR\x0cpredictionId\x12\x15\n\x06row_id\x18\x02 \x01(\tR\x05rowId\x12\x1f\n\x0btarget_name\x18\x03 \x01(\tR\ntargetName\x12\x46\n\x12observation_values\x18\x04 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\x11observationValues\x12H\n\x13observation_context\x18\x05 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\x12observationContext\x12O\n\x15observation_timestamp\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x14observationTimestamp\"[\n\x16LogObservationsRequest\x12\x41\n\x0cobservations\x18\x01 \x03(\x0b\x32\x1d.caraml.upi.v1.ObservationLogR\x0cobservations\"K\n\x17LogObservationsResponse\x12\x30\n\x14observation_batch_id\x18\x01 \x01(\tR\x12observationBatchId2\x97\x01\n\x12ObservationService\x12\x80\x01\n\x0fLogObservations\x12%.caraml.upi.v1.LogObservationsRequest\x1a&.caraml.upi.v1.LogObservationsResponse\"\x1e\x82\xd3\xe4\x93\x02\x18\"\x13/v1/log-observation:\x01*B\xcf\x01\n\x11\x63om.caraml.upi.v1B\x13ObservationLogProtoP\x01ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\xa2\x02\x03\x43UX\xaa\x02\rCaraml.Upi.V1\xca\x02\rCaraml\\Upi\\V1\xe2\x02\x19\x43\x61raml\\Upi\\V1\\GPBMetadata\xea\x02\x0f\x43\x61raml::Upi::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError => e + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["caraml.upi.v1.Variable", "caraml/upi/v1/variable.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" end end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." end module Caraml diff --git a/gen/ruby/grpc/caraml/upi/v1/prediction_log_pb.rb b/gen/ruby/grpc/caraml/upi/v1/prediction_log_pb.rb index 09c3834..725fc4b 100644 --- a/gen/ruby/grpc/caraml/upi/v1/prediction_log_pb.rb +++ b/gen/ruby/grpc/caraml/upi/v1/prediction_log_pb.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! # source: caraml/upi/v1/prediction_log.proto @@ -8,34 +9,35 @@ require 'google/protobuf/timestamp_pb' require 'google/protobuf/struct_pb' -Google::Protobuf::DescriptorPool.generated_pool.build do - add_file("caraml/upi/v1/prediction_log.proto", :syntax => :proto3) do - add_message "caraml.upi.v1.PredictionLog" do - optional :prediction_id, :string, 1, json_name: "predictionId" - optional :target_name, :string, 2, json_name: "targetName" - optional :project_name, :string, 3, json_name: "projectName" - optional :model_name, :string, 4, json_name: "modelName" - optional :model_version, :string, 5, json_name: "modelVersion" - optional :input, :message, 10, "caraml.upi.v1.ModelInput", json_name: "input" - optional :output, :message, 11, "caraml.upi.v1.ModelOutput", json_name: "output" - optional :request_timestamp, :message, 20, "google.protobuf.Timestamp", json_name: "requestTimestamp" - optional :table_schema_version, :uint32, 100, json_name: "tableSchemaVersion" - end - add_message "caraml.upi.v1.ModelInput" do - optional :features_table, :message, 1, "google.protobuf.Struct", json_name: "featuresTable" - optional :entities_table, :message, 2, "google.protobuf.Struct", json_name: "entitiesTable" - optional :raw_features, :message, 3, "google.protobuf.Struct", json_name: "rawFeatures" - repeated :prediction_context, :message, 4, "caraml.upi.v1.Variable", json_name: "predictionContext" - repeated :headers, :message, 10, "caraml.upi.v1.Header", json_name: "headers" - end - add_message "caraml.upi.v1.ModelOutput" do - optional :prediction_results_table, :message, 1, "google.protobuf.Struct", json_name: "predictionResultsTable" - repeated :prediction_context, :message, 2, "caraml.upi.v1.Variable", json_name: "predictionContext" - repeated :headers, :message, 10, "caraml.upi.v1.Header", json_name: "headers" - optional :status, :uint32, 11, json_name: "status" - optional :message, :string, 12, json_name: "message" + +descriptor_data = "\n\"caraml/upi/v1/prediction_log.proto\x12\rcaraml.upi.v1\x1a\x1a\x63\x61raml/upi/v1/header.proto\x1a\x1c\x63\x61raml/upi/v1/variable.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x9c\x03\n\rPredictionLog\x12#\n\rprediction_id\x18\x01 \x01(\tR\x0cpredictionId\x12\x1f\n\x0btarget_name\x18\x02 \x01(\tR\ntargetName\x12!\n\x0cproject_name\x18\x03 \x01(\tR\x0bprojectName\x12\x1d\n\nmodel_name\x18\x04 \x01(\tR\tmodelName\x12#\n\rmodel_version\x18\x05 \x01(\tR\x0cmodelVersion\x12/\n\x05input\x18\n \x01(\x0b\x32\x19.caraml.upi.v1.ModelInputR\x05input\x12\x32\n\x06output\x18\x0b \x01(\x0b\x32\x1a.caraml.upi.v1.ModelOutputR\x06output\x12G\n\x11request_timestamp\x18\x14 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x10requestTimestamp\x12\x30\n\x14table_schema_version\x18\x64 \x01(\rR\x12tableSchemaVersion\"\xc1\x02\n\nModelInput\x12>\n\x0e\x66\x65\x61tures_table\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructR\rfeaturesTable\x12>\n\x0e\x65ntities_table\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructR\rentitiesTable\x12:\n\x0craw_features\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructR\x0brawFeatures\x12\x46\n\x12prediction_context\x18\x04 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\x11predictionContext\x12/\n\x07headers\x18\n \x03(\x0b\x32\x15.caraml.upi.v1.HeaderR\x07headers\"\x8b\x02\n\x0bModelOutput\x12Q\n\x18prediction_results_table\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructR\x16predictionResultsTable\x12\x46\n\x12prediction_context\x18\x02 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\x11predictionContext\x12/\n\x07headers\x18\n \x03(\x0b\x32\x15.caraml.upi.v1.HeaderR\x07headers\x12\x16\n\x06status\x18\x0b \x01(\rR\x06status\x12\x18\n\x07message\x18\x0c \x01(\tR\x07messageB\xce\x01\n\x11\x63om.caraml.upi.v1B\x12PredictionLogProtoP\x01ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\xa2\x02\x03\x43UX\xaa\x02\rCaraml.Upi.V1\xca\x02\rCaraml\\Upi\\V1\xe2\x02\x19\x43\x61raml\\Upi\\V1\\GPBMetadata\xea\x02\x0f\x43\x61raml::Upi::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError => e + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.Struct", "google/protobuf/struct.proto"], + ["caraml.upi.v1.Variable", "caraml/upi/v1/variable.proto"], + ["caraml.upi.v1.Header", "caraml/upi/v1/header.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" end end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." end module Caraml diff --git a/gen/ruby/grpc/caraml/upi/v1/router_log_pb.rb b/gen/ruby/grpc/caraml/upi/v1/router_log_pb.rb index 36baf80..bb8fd59 100644 --- a/gen/ruby/grpc/caraml/upi/v1/router_log_pb.rb +++ b/gen/ruby/grpc/caraml/upi/v1/router_log_pb.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! # source: caraml/upi/v1/router_log.proto @@ -9,41 +10,36 @@ require 'google/protobuf/timestamp_pb' require 'google/protobuf/struct_pb' -Google::Protobuf::DescriptorPool.generated_pool.build do - add_file("caraml/upi/v1/router_log.proto", :syntax => :proto3) do - add_message "caraml.upi.v1.RouterLog" do - optional :prediction_id, :string, 1, json_name: "predictionId" - optional :target_name, :string, 2, json_name: "targetName" - optional :project_name, :string, 3, json_name: "projectName" - optional :router_name, :string, 4, json_name: "routerName" - optional :router_version, :string, 5, json_name: "routerVersion" - optional :routing_logic, :message, 10, "caraml.upi.v1.RoutingLogic", json_name: "routingLogic" - optional :router_input, :message, 11, "caraml.upi.v1.RouterInput", json_name: "routerInput" - optional :router_output, :message, 12, "caraml.upi.v1.RouterOutput", json_name: "routerOutput" - optional :request_timestamp, :message, 20, "google.protobuf.Timestamp", json_name: "requestTimestamp" - optional :table_schema_version, :uint32, 100, json_name: "tableSchemaVersion" - end - add_message "caraml.upi.v1.RoutingLogic" do - repeated :models, :message, 1, "caraml.upi.v1.ModelMetadata", json_name: "models" - optional :traffic_rule, :string, 2, json_name: "trafficRule" - optional :experiment_name, :string, 3, json_name: "experimentName" - optional :treatment_name, :string, 4, json_name: "treatmentName" - end - add_message "caraml.upi.v1.RouterInput" do - optional :prediction_table, :message, 1, "google.protobuf.Struct", json_name: "predictionTable" - repeated :transformer_tables, :message, 2, "google.protobuf.Struct", json_name: "transformerTables" - repeated :transformer_variables, :message, 3, "caraml.upi.v1.Variable", json_name: "transformerVariables" - repeated :prediction_context, :message, 4, "caraml.upi.v1.Variable", json_name: "predictionContext" - repeated :headers, :message, 10, "caraml.upi.v1.Header", json_name: "headers" - end - add_message "caraml.upi.v1.RouterOutput" do - optional :prediction_results_table, :message, 1, "google.protobuf.Struct", json_name: "predictionResultsTable" - repeated :prediction_context, :message, 2, "caraml.upi.v1.Variable", json_name: "predictionContext" - repeated :headers, :message, 10, "caraml.upi.v1.Header", json_name: "headers" - optional :status, :uint32, 11, json_name: "status" - optional :message, :string, 12, json_name: "message" + +descriptor_data = "\n\x1e\x63\x61raml/upi/v1/router_log.proto\x12\rcaraml.upi.v1\x1a\x1a\x63\x61raml/upi/v1/header.proto\x1a\x1c\x63\x61raml/upi/v1/variable.proto\x1a\x17\x63\x61raml/upi/v1/upi.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xfa\x03\n\tRouterLog\x12#\n\rprediction_id\x18\x01 \x01(\tR\x0cpredictionId\x12\x1f\n\x0btarget_name\x18\x02 \x01(\tR\ntargetName\x12!\n\x0cproject_name\x18\x03 \x01(\tR\x0bprojectName\x12\x1f\n\x0brouter_name\x18\x04 \x01(\tR\nrouterName\x12%\n\x0erouter_version\x18\x05 \x01(\tR\rrouterVersion\x12@\n\rrouting_logic\x18\n \x01(\x0b\x32\x1b.caraml.upi.v1.RoutingLogicR\x0croutingLogic\x12=\n\x0crouter_input\x18\x0b \x01(\x0b\x32\x1a.caraml.upi.v1.RouterInputR\x0brouterInput\x12@\n\rrouter_output\x18\x0c \x01(\x0b\x32\x1b.caraml.upi.v1.RouterOutputR\x0crouterOutput\x12G\n\x11request_timestamp\x18\x14 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x10requestTimestamp\x12\x30\n\x14table_schema_version\x18\x64 \x01(\rR\x12tableSchemaVersion\"\xb7\x01\n\x0cRoutingLogic\x12\x34\n\x06models\x18\x01 \x03(\x0b\x32\x1c.caraml.upi.v1.ModelMetadataR\x06models\x12!\n\x0ctraffic_rule\x18\x02 \x01(\tR\x0btrafficRule\x12\'\n\x0f\x65xperiment_name\x18\x03 \x01(\tR\x0e\x65xperimentName\x12%\n\x0etreatment_name\x18\x04 \x01(\tR\rtreatmentName\"\xe0\x02\n\x0bRouterInput\x12\x42\n\x10prediction_table\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructR\x0fpredictionTable\x12\x46\n\x12transformer_tables\x18\x02 \x03(\x0b\x32\x17.google.protobuf.StructR\x11transformerTables\x12L\n\x15transformer_variables\x18\x03 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\x14transformerVariables\x12\x46\n\x12prediction_context\x18\x04 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\x11predictionContext\x12/\n\x07headers\x18\n \x03(\x0b\x32\x15.caraml.upi.v1.HeaderR\x07headers\"\x8c\x02\n\x0cRouterOutput\x12Q\n\x18prediction_results_table\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructR\x16predictionResultsTable\x12\x46\n\x12prediction_context\x18\x02 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\x11predictionContext\x12/\n\x07headers\x18\n \x03(\x0b\x32\x15.caraml.upi.v1.HeaderR\x07headers\x12\x16\n\x06status\x18\x0b \x01(\rR\x06status\x12\x18\n\x07message\x18\x0c \x01(\tR\x07messageB\xca\x01\n\x11\x63om.caraml.upi.v1B\x0eRouterLogProtoP\x01ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\xa2\x02\x03\x43UX\xaa\x02\rCaraml.Upi.V1\xca\x02\rCaraml\\Upi\\V1\xe2\x02\x19\x43\x61raml\\Upi\\V1\\GPBMetadata\xea\x02\x0f\x43\x61raml::Upi::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError => e + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["caraml.upi.v1.ModelMetadata", "caraml/upi/v1/upi.proto"], + ["google.protobuf.Struct", "google/protobuf/struct.proto"], + ["caraml.upi.v1.Variable", "caraml/upi/v1/variable.proto"], + ["caraml.upi.v1.Header", "caraml/upi/v1/header.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" end end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." end module Caraml diff --git a/gen/ruby/grpc/caraml/upi/v1/table_pb.rb b/gen/ruby/grpc/caraml/upi/v1/table_pb.rb index 1122df8..fe0fed7 100644 --- a/gen/ruby/grpc/caraml/upi/v1/table_pb.rb +++ b/gen/ruby/grpc/caraml/upi/v1/table_pb.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! # source: caraml/upi/v1/table.proto @@ -5,28 +6,31 @@ require 'caraml/upi/v1/type_pb' -Google::Protobuf::DescriptorPool.generated_pool.build do - add_file("caraml/upi/v1/table.proto", :syntax => :proto3) do - add_message "caraml.upi.v1.Table" do - optional :name, :string, 1, json_name: "name" - repeated :columns, :message, 2, "caraml.upi.v1.Column", json_name: "columns" - repeated :rows, :message, 3, "caraml.upi.v1.Row", json_name: "rows" - end - add_message "caraml.upi.v1.Column" do - optional :name, :string, 1, json_name: "name" - optional :type, :enum, 2, "caraml.upi.v1.Type", json_name: "type" - end - add_message "caraml.upi.v1.Row" do - optional :row_id, :string, 1, json_name: "rowId" - repeated :values, :message, 2, "caraml.upi.v1.Value", json_name: "values" - end - add_message "caraml.upi.v1.Value" do - optional :double_value, :double, 1, json_name: "doubleValue" - optional :integer_value, :int64, 2, json_name: "integerValue" - optional :string_value, :string, 3, json_name: "stringValue" - optional :is_null, :bool, 10, json_name: "isNull" + +descriptor_data = "\n\x19\x63\x61raml/upi/v1/table.proto\x12\rcaraml.upi.v1\x1a\x18\x63\x61raml/upi/v1/type.proto\"t\n\x05Table\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12/\n\x07\x63olumns\x18\x02 \x03(\x0b\x32\x15.caraml.upi.v1.ColumnR\x07\x63olumns\x12&\n\x04rows\x18\x03 \x03(\x0b\x32\x12.caraml.upi.v1.RowR\x04rows\"E\n\x06\x43olumn\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\'\n\x04type\x18\x02 \x01(\x0e\x32\x13.caraml.upi.v1.TypeR\x04type\"J\n\x03Row\x12\x15\n\x06row_id\x18\x01 \x01(\tR\x05rowId\x12,\n\x06values\x18\x02 \x03(\x0b\x32\x14.caraml.upi.v1.ValueR\x06values\"\x8b\x01\n\x05Value\x12!\n\x0c\x64ouble_value\x18\x01 \x01(\x01R\x0b\x64oubleValue\x12#\n\rinteger_value\x18\x02 \x01(\x03R\x0cintegerValue\x12!\n\x0cstring_value\x18\x03 \x01(\tR\x0bstringValue\x12\x17\n\x07is_null\x18\n \x01(\x08R\x06isNullB\xc6\x01\n\x11\x63om.caraml.upi.v1B\nTableProtoP\x01ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\xa2\x02\x03\x43UX\xaa\x02\rCaraml.Upi.V1\xca\x02\rCaraml\\Upi\\V1\xe2\x02\x19\x43\x61raml\\Upi\\V1\\GPBMetadata\xea\x02\x0f\x43\x61raml::Upi::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError => e + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" end end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." end module Caraml diff --git a/gen/ruby/grpc/caraml/upi/v1/type_pb.rb b/gen/ruby/grpc/caraml/upi/v1/type_pb.rb index 97f6bcd..b99521a 100644 --- a/gen/ruby/grpc/caraml/upi/v1/type_pb.rb +++ b/gen/ruby/grpc/caraml/upi/v1/type_pb.rb @@ -1,17 +1,34 @@ +# frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! # source: caraml/upi/v1/type.proto require 'google/protobuf' -Google::Protobuf::DescriptorPool.generated_pool.build do - add_file("caraml/upi/v1/type.proto", :syntax => :proto3) do - add_enum "caraml.upi.v1.Type" do - value :TYPE_UNSPECIFIED, 0 - value :TYPE_DOUBLE, 1 - value :TYPE_INTEGER, 2 - value :TYPE_STRING, 3 + +descriptor_data = "\n\x18\x63\x61raml/upi/v1/type.proto\x12\rcaraml.upi.v1*P\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bTYPE_DOUBLE\x10\x01\x12\x10\n\x0cTYPE_INTEGER\x10\x02\x12\x0f\n\x0bTYPE_STRING\x10\x03\x42\xc5\x01\n\x11\x63om.caraml.upi.v1B\tTypeProtoP\x01ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\xa2\x02\x03\x43UX\xaa\x02\rCaraml.Upi.V1\xca\x02\rCaraml\\Upi\\V1\xe2\x02\x19\x43\x61raml\\Upi\\V1\\GPBMetadata\xea\x02\x0f\x43\x61raml::Upi::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError => e + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" end end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." end module Caraml diff --git a/gen/ruby/grpc/caraml/upi/v1/upi_pb.rb b/gen/ruby/grpc/caraml/upi/v1/upi_pb.rb index c07752e..4a325de 100644 --- a/gen/ruby/grpc/caraml/upi/v1/upi_pb.rb +++ b/gen/ruby/grpc/caraml/upi/v1/upi_pb.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! # source: caraml/upi/v1/upi.proto @@ -8,40 +9,34 @@ require 'google/protobuf/timestamp_pb' require 'google/api/annotations_pb' -Google::Protobuf::DescriptorPool.generated_pool.build do - add_file("caraml/upi/v1/upi.proto", :syntax => :proto3) do - add_message "caraml.upi.v1.PredictValuesRequest" do - optional :prediction_table, :message, 1, "caraml.upi.v1.Table", json_name: "predictionTable" - optional :transformer_input, :message, 4, "caraml.upi.v1.TransformerInput", json_name: "transformerInput" - optional :target_name, :string, 2, json_name: "targetName" - repeated :prediction_context, :message, 3, "caraml.upi.v1.Variable", json_name: "predictionContext" - optional :metadata, :message, 10, "caraml.upi.v1.RequestMetadata", json_name: "metadata" - end - add_message "caraml.upi.v1.RequestMetadata" do - optional :prediction_id, :string, 1, json_name: "predictionId" - optional :request_timestamp, :message, 2, "google.protobuf.Timestamp", json_name: "requestTimestamp" - end - add_message "caraml.upi.v1.PredictValuesResponse" do - optional :prediction_result_table, :message, 1, "caraml.upi.v1.Table", json_name: "predictionResultTable" - optional :target_name, :string, 2, json_name: "targetName" - repeated :prediction_context, :message, 3, "caraml.upi.v1.Variable", json_name: "predictionContext" - optional :metadata, :message, 10, "caraml.upi.v1.ResponseMetadata", json_name: "metadata" - end - add_message "caraml.upi.v1.ResponseMetadata" do - optional :prediction_id, :string, 1, json_name: "predictionId" - repeated :models, :message, 2, "caraml.upi.v1.ModelMetadata", json_name: "models" - optional :experiment_name, :string, 3, json_name: "experimentName" - optional :treatment_name, :string, 4, json_name: "treatmentName" - end - add_message "caraml.upi.v1.ModelMetadata" do - optional :name, :string, 1, json_name: "name" - optional :version, :string, 2, json_name: "version" - end - add_message "caraml.upi.v1.TransformerInput" do - repeated :tables, :message, 1, "caraml.upi.v1.Table", json_name: "tables" - repeated :variables, :message, 2, "caraml.upi.v1.Variable", json_name: "variables" + +descriptor_data = "\n\x17\x63\x61raml/upi/v1/upi.proto\x12\rcaraml.upi.v1\x1a\x1c\x63\x61raml/upi/v1/variable.proto\x1a\x19\x63\x61raml/upi/v1/table.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto\"\xca\x02\n\x14PredictValuesRequest\x12?\n\x10prediction_table\x18\x01 \x01(\x0b\x32\x14.caraml.upi.v1.TableR\x0fpredictionTable\x12L\n\x11transformer_input\x18\x04 \x01(\x0b\x32\x1f.caraml.upi.v1.TransformerInputR\x10transformerInput\x12\x1f\n\x0btarget_name\x18\x02 \x01(\tR\ntargetName\x12\x46\n\x12prediction_context\x18\x03 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\x11predictionContext\x12:\n\x08metadata\x18\n \x01(\x0b\x32\x1e.caraml.upi.v1.RequestMetadataR\x08metadata\"\x7f\n\x0fRequestMetadata\x12#\n\rprediction_id\x18\x01 \x01(\tR\x0cpredictionId\x12G\n\x11request_timestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x10requestTimestamp\"\x8b\x02\n\x15PredictValuesResponse\x12L\n\x17prediction_result_table\x18\x01 \x01(\x0b\x32\x14.caraml.upi.v1.TableR\x15predictionResultTable\x12\x1f\n\x0btarget_name\x18\x02 \x01(\tR\ntargetName\x12\x46\n\x12prediction_context\x18\x03 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\x11predictionContext\x12;\n\x08metadata\x18\n \x01(\x0b\x32\x1f.caraml.upi.v1.ResponseMetadataR\x08metadata\"\xbd\x01\n\x10ResponseMetadata\x12#\n\rprediction_id\x18\x01 \x01(\tR\x0cpredictionId\x12\x34\n\x06models\x18\x02 \x03(\x0b\x32\x1c.caraml.upi.v1.ModelMetadataR\x06models\x12\'\n\x0f\x65xperiment_name\x18\x03 \x01(\tR\x0e\x65xperimentName\x12%\n\x0etreatment_name\x18\x04 \x01(\tR\rtreatmentName\"=\n\rModelMetadata\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n\x07version\x18\x02 \x01(\tR\x07version\"w\n\x10TransformerInput\x12,\n\x06tables\x18\x01 \x03(\x0b\x32\x14.caraml.upi.v1.TableR\x06tables\x12\x35\n\tvariables\x18\x02 \x03(\x0b\x32\x17.caraml.upi.v1.VariableR\tvariables2\x90\x01\n\x1aUniversalPredictionService\x12r\n\rPredictValues\x12#.caraml.upi.v1.PredictValuesRequest\x1a$.caraml.upi.v1.PredictValuesResponse\"\x16\x82\xd3\xe4\x93\x02\x10\"\x0b/v1/predict:\x01*B\xc4\x01\n\x11\x63om.caraml.upi.v1B\x08UpiProtoP\x01ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\xa2\x02\x03\x43UX\xaa\x02\rCaraml.Upi.V1\xca\x02\rCaraml\\Upi\\V1\xe2\x02\x19\x43\x61raml\\Upi\\V1\\GPBMetadata\xea\x02\x0f\x43\x61raml::Upi::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError => e + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["caraml.upi.v1.Table", "caraml/upi/v1/table.proto"], + ["caraml.upi.v1.Variable", "caraml/upi/v1/variable.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" end end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." end module Caraml diff --git a/gen/ruby/grpc/caraml/upi/v1/variable_pb.rb b/gen/ruby/grpc/caraml/upi/v1/variable_pb.rb index 6ea1fbb..b41db36 100644 --- a/gen/ruby/grpc/caraml/upi/v1/variable_pb.rb +++ b/gen/ruby/grpc/caraml/upi/v1/variable_pb.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! # source: caraml/upi/v1/variable.proto @@ -5,16 +6,31 @@ require 'caraml/upi/v1/type_pb' -Google::Protobuf::DescriptorPool.generated_pool.build do - add_file("caraml/upi/v1/variable.proto", :syntax => :proto3) do - add_message "caraml.upi.v1.Variable" do - optional :name, :string, 1, json_name: "name" - optional :type, :enum, 2, "caraml.upi.v1.Type", json_name: "type" - optional :double_value, :double, 3, json_name: "doubleValue" - optional :integer_value, :int64, 4, json_name: "integerValue" - optional :string_value, :string, 5, json_name: "stringValue" + +descriptor_data = "\n\x1c\x63\x61raml/upi/v1/variable.proto\x12\rcaraml.upi.v1\x1a\x18\x63\x61raml/upi/v1/type.proto\"\xb2\x01\n\x08Variable\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\'\n\x04type\x18\x02 \x01(\x0e\x32\x13.caraml.upi.v1.TypeR\x04type\x12!\n\x0c\x64ouble_value\x18\x03 \x01(\x01R\x0b\x64oubleValue\x12#\n\rinteger_value\x18\x04 \x01(\x03R\x0cintegerValue\x12!\n\x0cstring_value\x18\x05 \x01(\tR\x0bstringValueB\xc9\x01\n\x11\x63om.caraml.upi.v1B\rVariableProtoP\x01ZOgithub.com/caraml-dev/universal-prediction-interface/gen/go/caraml/upi/v1;upiv1\xa2\x02\x03\x43UX\xaa\x02\rCaraml.Upi.V1\xca\x02\rCaraml\\Upi\\V1\xe2\x02\x19\x43\x61raml\\Upi\\V1\\GPBMetadata\xea\x02\x0f\x43\x61raml::Upi::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError => e + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" end end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." end module Caraml diff --git a/proto/buf.lock b/proto/buf.lock index f2c6b32..fccbfb8 100644 --- a/proto/buf.lock +++ b/proto/buf.lock @@ -4,8 +4,10 @@ deps: - remote: buf.build owner: googleapis repository: googleapis - commit: 8d7204855ec14631a499bd7393ce1970 + commit: 28151c0d0a1641bf938a7672c500e01d + digest: shake256:49215edf8ef57f7863004539deff8834cfb2195113f0b890dd1f67815d9353e28e668019165b9d872395871eeafcbab3ccfdb2b5f11734d3cca95be9e8d139de - remote: buf.build owner: grpc-ecosystem repository: grpc-gateway - commit: bc28b723cd774c32b6fbc77621518765 + commit: 048ae6ff94ca4476b3225904b1078fad + digest: shake256:e5250bf2d999516c02206d757502b902e406f35c099d0e869dc3e4f923f6870fe0805a9974c27df0695462937eae90cd4d9db90bb9a03489412560baa74a87b6