From 8f19e7b5645178c02a0bc8acf7c0b9c6d7d59513 Mon Sep 17 00:00:00 2001 From: Nick Groszewski Date: Wed, 1 Apr 2020 20:26:39 -0400 Subject: [PATCH] feat(proto): Add custom proto handling Additional `customData` field added to the prediction protobuf, as well as updates to the python package to properly pass the raw protobuf section down to the `user_model` implementation. Addresses SeldonIO/seldon-core#1420 Signed off by Nick Groszewski () --- executor/api/grpc/prediction.pb.go | 1576 +++++++++++ proto/prediction.proto | 6 +- python/seldon_core/proto/prediction.proto | 6 +- python/seldon_core/proto/prediction_pb2.py | 2340 ++++++++++------- python/seldon_core/proto/prediction_pb2.pyi | 303 ++- .../core/framework/resource_handle_pb2.py | 371 ++- .../tensorflow/core/framework/tensor_pb2.py | 677 +++-- .../core/framework/tensor_shape_pb2.py | 225 +- .../tensorflow/core/framework/types_pb2.py | 450 ++-- python/seldon_core/seldon_client.py | 29 +- python/seldon_core/utils.py | 10 +- python/setup.cfg | 2 +- python/tests/test_seldon_client.py | 22 + python/tests/test_utils.py | 13 + 14 files changed, 4336 insertions(+), 1694 deletions(-) create mode 100644 executor/api/grpc/prediction.pb.go diff --git a/executor/api/grpc/prediction.pb.go b/executor/api/grpc/prediction.pb.go new file mode 100644 index 0000000000..03c4e65cab --- /dev/null +++ b/executor/api/grpc/prediction.pb.go @@ -0,0 +1,1576 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: prediction.proto + +package api + +import ( + context "context" + fmt "fmt" + proto "github.com/golang/protobuf/proto" + any "github.com/golang/protobuf/ptypes/any" + _struct "github.com/golang/protobuf/ptypes/struct" + framework "github.com/tensorflow/tensorflow/tensorflow/go/core/framework" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type Metric_MetricType int32 + +const ( + Metric_COUNTER Metric_MetricType = 0 + Metric_GAUGE Metric_MetricType = 1 + Metric_TIMER Metric_MetricType = 2 +) + +var Metric_MetricType_name = map[int32]string{ + 0: "COUNTER", + 1: "GAUGE", + 2: "TIMER", +} + +var Metric_MetricType_value = map[string]int32{ + "COUNTER": 0, + "GAUGE": 1, + "TIMER": 2, +} + +func (x Metric_MetricType) String() string { + return proto.EnumName(Metric_MetricType_name, int32(x)) +} + +func (Metric_MetricType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_430b55197713f541, []int{4, 0} +} + +type Status_StatusFlag int32 + +const ( + Status_SUCCESS Status_StatusFlag = 0 + Status_FAILURE Status_StatusFlag = 1 +) + +var Status_StatusFlag_name = map[int32]string{ + 0: "SUCCESS", + 1: "FAILURE", +} + +var Status_StatusFlag_value = map[string]int32{ + "SUCCESS": 0, + "FAILURE": 1, +} + +func (x Status_StatusFlag) String() string { + return proto.EnumName(Status_StatusFlag_name, int32(x)) +} + +func (Status_StatusFlag) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_430b55197713f541, []int{6, 0} +} + +type SeldonMessage struct { + Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Meta *Meta `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta,omitempty"` + // Types that are valid to be assigned to DataOneof: + // *SeldonMessage_Data + // *SeldonMessage_BinData + // *SeldonMessage_StrData + // *SeldonMessage_JsonData + // *SeldonMessage_CustomData + DataOneof isSeldonMessage_DataOneof `protobuf_oneof:"data_oneof"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SeldonMessage) Reset() { *m = SeldonMessage{} } +func (m *SeldonMessage) String() string { return proto.CompactTextString(m) } +func (*SeldonMessage) ProtoMessage() {} +func (*SeldonMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_430b55197713f541, []int{0} +} + +func (m *SeldonMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SeldonMessage.Unmarshal(m, b) +} +func (m *SeldonMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SeldonMessage.Marshal(b, m, deterministic) +} +func (m *SeldonMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_SeldonMessage.Merge(m, src) +} +func (m *SeldonMessage) XXX_Size() int { + return xxx_messageInfo_SeldonMessage.Size(m) +} +func (m *SeldonMessage) XXX_DiscardUnknown() { + xxx_messageInfo_SeldonMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_SeldonMessage proto.InternalMessageInfo + +func (m *SeldonMessage) GetStatus() *Status { + if m != nil { + return m.Status + } + return nil +} + +func (m *SeldonMessage) GetMeta() *Meta { + if m != nil { + return m.Meta + } + return nil +} + +type isSeldonMessage_DataOneof interface { + isSeldonMessage_DataOneof() +} + +type SeldonMessage_Data struct { + Data *DefaultData `protobuf:"bytes,3,opt,name=data,proto3,oneof"` +} + +type SeldonMessage_BinData struct { + BinData []byte `protobuf:"bytes,4,opt,name=binData,proto3,oneof"` +} + +type SeldonMessage_StrData struct { + StrData string `protobuf:"bytes,5,opt,name=strData,proto3,oneof"` +} + +type SeldonMessage_JsonData struct { + JsonData *_struct.Value `protobuf:"bytes,6,opt,name=jsonData,proto3,oneof"` +} + +type SeldonMessage_CustomData struct { + CustomData *any.Any `protobuf:"bytes,7,opt,name=customData,proto3,oneof"` +} + +func (*SeldonMessage_Data) isSeldonMessage_DataOneof() {} + +func (*SeldonMessage_BinData) isSeldonMessage_DataOneof() {} + +func (*SeldonMessage_StrData) isSeldonMessage_DataOneof() {} + +func (*SeldonMessage_JsonData) isSeldonMessage_DataOneof() {} + +func (*SeldonMessage_CustomData) isSeldonMessage_DataOneof() {} + +func (m *SeldonMessage) GetDataOneof() isSeldonMessage_DataOneof { + if m != nil { + return m.DataOneof + } + return nil +} + +func (m *SeldonMessage) GetData() *DefaultData { + if x, ok := m.GetDataOneof().(*SeldonMessage_Data); ok { + return x.Data + } + return nil +} + +func (m *SeldonMessage) GetBinData() []byte { + if x, ok := m.GetDataOneof().(*SeldonMessage_BinData); ok { + return x.BinData + } + return nil +} + +func (m *SeldonMessage) GetStrData() string { + if x, ok := m.GetDataOneof().(*SeldonMessage_StrData); ok { + return x.StrData + } + return "" +} + +func (m *SeldonMessage) GetJsonData() *_struct.Value { + if x, ok := m.GetDataOneof().(*SeldonMessage_JsonData); ok { + return x.JsonData + } + return nil +} + +func (m *SeldonMessage) GetCustomData() *any.Any { + if x, ok := m.GetDataOneof().(*SeldonMessage_CustomData); ok { + return x.CustomData + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*SeldonMessage) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*SeldonMessage_Data)(nil), + (*SeldonMessage_BinData)(nil), + (*SeldonMessage_StrData)(nil), + (*SeldonMessage_JsonData)(nil), + (*SeldonMessage_CustomData)(nil), + } +} + +type DefaultData struct { + Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` + // Types that are valid to be assigned to DataOneof: + // *DefaultData_Tensor + // *DefaultData_Ndarray + // *DefaultData_Tftensor + DataOneof isDefaultData_DataOneof `protobuf_oneof:"data_oneof"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DefaultData) Reset() { *m = DefaultData{} } +func (m *DefaultData) String() string { return proto.CompactTextString(m) } +func (*DefaultData) ProtoMessage() {} +func (*DefaultData) Descriptor() ([]byte, []int) { + return fileDescriptor_430b55197713f541, []int{1} +} + +func (m *DefaultData) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DefaultData.Unmarshal(m, b) +} +func (m *DefaultData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DefaultData.Marshal(b, m, deterministic) +} +func (m *DefaultData) XXX_Merge(src proto.Message) { + xxx_messageInfo_DefaultData.Merge(m, src) +} +func (m *DefaultData) XXX_Size() int { + return xxx_messageInfo_DefaultData.Size(m) +} +func (m *DefaultData) XXX_DiscardUnknown() { + xxx_messageInfo_DefaultData.DiscardUnknown(m) +} + +var xxx_messageInfo_DefaultData proto.InternalMessageInfo + +func (m *DefaultData) GetNames() []string { + if m != nil { + return m.Names + } + return nil +} + +type isDefaultData_DataOneof interface { + isDefaultData_DataOneof() +} + +type DefaultData_Tensor struct { + Tensor *Tensor `protobuf:"bytes,2,opt,name=tensor,proto3,oneof"` +} + +type DefaultData_Ndarray struct { + Ndarray *_struct.ListValue `protobuf:"bytes,3,opt,name=ndarray,proto3,oneof"` +} + +type DefaultData_Tftensor struct { + Tftensor *framework.TensorProto `protobuf:"bytes,4,opt,name=tftensor,proto3,oneof"` +} + +func (*DefaultData_Tensor) isDefaultData_DataOneof() {} + +func (*DefaultData_Ndarray) isDefaultData_DataOneof() {} + +func (*DefaultData_Tftensor) isDefaultData_DataOneof() {} + +func (m *DefaultData) GetDataOneof() isDefaultData_DataOneof { + if m != nil { + return m.DataOneof + } + return nil +} + +func (m *DefaultData) GetTensor() *Tensor { + if x, ok := m.GetDataOneof().(*DefaultData_Tensor); ok { + return x.Tensor + } + return nil +} + +func (m *DefaultData) GetNdarray() *_struct.ListValue { + if x, ok := m.GetDataOneof().(*DefaultData_Ndarray); ok { + return x.Ndarray + } + return nil +} + +func (m *DefaultData) GetTftensor() *framework.TensorProto { + if x, ok := m.GetDataOneof().(*DefaultData_Tftensor); ok { + return x.Tftensor + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*DefaultData) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*DefaultData_Tensor)(nil), + (*DefaultData_Ndarray)(nil), + (*DefaultData_Tftensor)(nil), + } +} + +type Tensor struct { + Shape []int32 `protobuf:"varint,1,rep,packed,name=shape,proto3" json:"shape,omitempty"` + Values []float64 `protobuf:"fixed64,2,rep,packed,name=values,proto3" json:"values,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Tensor) Reset() { *m = Tensor{} } +func (m *Tensor) String() string { return proto.CompactTextString(m) } +func (*Tensor) ProtoMessage() {} +func (*Tensor) Descriptor() ([]byte, []int) { + return fileDescriptor_430b55197713f541, []int{2} +} + +func (m *Tensor) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Tensor.Unmarshal(m, b) +} +func (m *Tensor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Tensor.Marshal(b, m, deterministic) +} +func (m *Tensor) XXX_Merge(src proto.Message) { + xxx_messageInfo_Tensor.Merge(m, src) +} +func (m *Tensor) XXX_Size() int { + return xxx_messageInfo_Tensor.Size(m) +} +func (m *Tensor) XXX_DiscardUnknown() { + xxx_messageInfo_Tensor.DiscardUnknown(m) +} + +var xxx_messageInfo_Tensor proto.InternalMessageInfo + +func (m *Tensor) GetShape() []int32 { + if m != nil { + return m.Shape + } + return nil +} + +func (m *Tensor) GetValues() []float64 { + if m != nil { + return m.Values + } + return nil +} + +type Meta struct { + Puid string `protobuf:"bytes,1,opt,name=puid,proto3" json:"puid,omitempty"` + Tags map[string]*_struct.Value `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Routing map[string]int32 `protobuf:"bytes,3,rep,name=routing,proto3" json:"routing,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + RequestPath map[string]string `protobuf:"bytes,4,rep,name=requestPath,proto3" json:"requestPath,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Metrics []*Metric `protobuf:"bytes,5,rep,name=metrics,proto3" json:"metrics,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Meta) Reset() { *m = Meta{} } +func (m *Meta) String() string { return proto.CompactTextString(m) } +func (*Meta) ProtoMessage() {} +func (*Meta) Descriptor() ([]byte, []int) { + return fileDescriptor_430b55197713f541, []int{3} +} + +func (m *Meta) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Meta.Unmarshal(m, b) +} +func (m *Meta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Meta.Marshal(b, m, deterministic) +} +func (m *Meta) XXX_Merge(src proto.Message) { + xxx_messageInfo_Meta.Merge(m, src) +} +func (m *Meta) XXX_Size() int { + return xxx_messageInfo_Meta.Size(m) +} +func (m *Meta) XXX_DiscardUnknown() { + xxx_messageInfo_Meta.DiscardUnknown(m) +} + +var xxx_messageInfo_Meta proto.InternalMessageInfo + +func (m *Meta) GetPuid() string { + if m != nil { + return m.Puid + } + return "" +} + +func (m *Meta) GetTags() map[string]*_struct.Value { + if m != nil { + return m.Tags + } + return nil +} + +func (m *Meta) GetRouting() map[string]int32 { + if m != nil { + return m.Routing + } + return nil +} + +func (m *Meta) GetRequestPath() map[string]string { + if m != nil { + return m.RequestPath + } + return nil +} + +func (m *Meta) GetMetrics() []*Metric { + if m != nil { + return m.Metrics + } + return nil +} + +type Metric struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Type Metric_MetricType `protobuf:"varint,2,opt,name=type,proto3,enum=seldon.protos.Metric_MetricType" json:"type,omitempty"` + Value float32 `protobuf:"fixed32,3,opt,name=value,proto3" json:"value,omitempty"` + Tags map[string]string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Metric) Reset() { *m = Metric{} } +func (m *Metric) String() string { return proto.CompactTextString(m) } +func (*Metric) ProtoMessage() {} +func (*Metric) Descriptor() ([]byte, []int) { + return fileDescriptor_430b55197713f541, []int{4} +} + +func (m *Metric) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Metric.Unmarshal(m, b) +} +func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Metric.Marshal(b, m, deterministic) +} +func (m *Metric) XXX_Merge(src proto.Message) { + xxx_messageInfo_Metric.Merge(m, src) +} +func (m *Metric) XXX_Size() int { + return xxx_messageInfo_Metric.Size(m) +} +func (m *Metric) XXX_DiscardUnknown() { + xxx_messageInfo_Metric.DiscardUnknown(m) +} + +var xxx_messageInfo_Metric proto.InternalMessageInfo + +func (m *Metric) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *Metric) GetType() Metric_MetricType { + if m != nil { + return m.Type + } + return Metric_COUNTER +} + +func (m *Metric) GetValue() float32 { + if m != nil { + return m.Value + } + return 0 +} + +func (m *Metric) GetTags() map[string]string { + if m != nil { + return m.Tags + } + return nil +} + +type SeldonMessageList struct { + SeldonMessages []*SeldonMessage `protobuf:"bytes,1,rep,name=seldonMessages,proto3" json:"seldonMessages,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SeldonMessageList) Reset() { *m = SeldonMessageList{} } +func (m *SeldonMessageList) String() string { return proto.CompactTextString(m) } +func (*SeldonMessageList) ProtoMessage() {} +func (*SeldonMessageList) Descriptor() ([]byte, []int) { + return fileDescriptor_430b55197713f541, []int{5} +} + +func (m *SeldonMessageList) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SeldonMessageList.Unmarshal(m, b) +} +func (m *SeldonMessageList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SeldonMessageList.Marshal(b, m, deterministic) +} +func (m *SeldonMessageList) XXX_Merge(src proto.Message) { + xxx_messageInfo_SeldonMessageList.Merge(m, src) +} +func (m *SeldonMessageList) XXX_Size() int { + return xxx_messageInfo_SeldonMessageList.Size(m) +} +func (m *SeldonMessageList) XXX_DiscardUnknown() { + xxx_messageInfo_SeldonMessageList.DiscardUnknown(m) +} + +var xxx_messageInfo_SeldonMessageList proto.InternalMessageInfo + +func (m *SeldonMessageList) GetSeldonMessages() []*SeldonMessage { + if m != nil { + return m.SeldonMessages + } + return nil +} + +type Status struct { + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Info string `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` + Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"` + Status Status_StatusFlag `protobuf:"varint,4,opt,name=status,proto3,enum=seldon.protos.Status_StatusFlag" json:"status,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Status) Reset() { *m = Status{} } +func (m *Status) String() string { return proto.CompactTextString(m) } +func (*Status) ProtoMessage() {} +func (*Status) Descriptor() ([]byte, []int) { + return fileDescriptor_430b55197713f541, []int{6} +} + +func (m *Status) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Status.Unmarshal(m, b) +} +func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Status.Marshal(b, m, deterministic) +} +func (m *Status) XXX_Merge(src proto.Message) { + xxx_messageInfo_Status.Merge(m, src) +} +func (m *Status) XXX_Size() int { + return xxx_messageInfo_Status.Size(m) +} +func (m *Status) XXX_DiscardUnknown() { + xxx_messageInfo_Status.DiscardUnknown(m) +} + +var xxx_messageInfo_Status proto.InternalMessageInfo + +func (m *Status) GetCode() int32 { + if m != nil { + return m.Code + } + return 0 +} + +func (m *Status) GetInfo() string { + if m != nil { + return m.Info + } + return "" +} + +func (m *Status) GetReason() string { + if m != nil { + return m.Reason + } + return "" +} + +func (m *Status) GetStatus() Status_StatusFlag { + if m != nil { + return m.Status + } + return Status_SUCCESS +} + +type Feedback struct { + Request *SeldonMessage `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` + Response *SeldonMessage `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"` + Reward float32 `protobuf:"fixed32,3,opt,name=reward,proto3" json:"reward,omitempty"` + Truth *SeldonMessage `protobuf:"bytes,4,opt,name=truth,proto3" json:"truth,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Feedback) Reset() { *m = Feedback{} } +func (m *Feedback) String() string { return proto.CompactTextString(m) } +func (*Feedback) ProtoMessage() {} +func (*Feedback) Descriptor() ([]byte, []int) { + return fileDescriptor_430b55197713f541, []int{7} +} + +func (m *Feedback) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Feedback.Unmarshal(m, b) +} +func (m *Feedback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Feedback.Marshal(b, m, deterministic) +} +func (m *Feedback) XXX_Merge(src proto.Message) { + xxx_messageInfo_Feedback.Merge(m, src) +} +func (m *Feedback) XXX_Size() int { + return xxx_messageInfo_Feedback.Size(m) +} +func (m *Feedback) XXX_DiscardUnknown() { + xxx_messageInfo_Feedback.DiscardUnknown(m) +} + +var xxx_messageInfo_Feedback proto.InternalMessageInfo + +func (m *Feedback) GetRequest() *SeldonMessage { + if m != nil { + return m.Request + } + return nil +} + +func (m *Feedback) GetResponse() *SeldonMessage { + if m != nil { + return m.Response + } + return nil +} + +func (m *Feedback) GetReward() float32 { + if m != nil { + return m.Reward + } + return 0 +} + +func (m *Feedback) GetTruth() *SeldonMessage { + if m != nil { + return m.Truth + } + return nil +} + +type RequestResponse struct { + Request *SeldonMessage `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` + Response *SeldonMessage `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RequestResponse) Reset() { *m = RequestResponse{} } +func (m *RequestResponse) String() string { return proto.CompactTextString(m) } +func (*RequestResponse) ProtoMessage() {} +func (*RequestResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_430b55197713f541, []int{8} +} + +func (m *RequestResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RequestResponse.Unmarshal(m, b) +} +func (m *RequestResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RequestResponse.Marshal(b, m, deterministic) +} +func (m *RequestResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestResponse.Merge(m, src) +} +func (m *RequestResponse) XXX_Size() int { + return xxx_messageInfo_RequestResponse.Size(m) +} +func (m *RequestResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RequestResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RequestResponse proto.InternalMessageInfo + +func (m *RequestResponse) GetRequest() *SeldonMessage { + if m != nil { + return m.Request + } + return nil +} + +func (m *RequestResponse) GetResponse() *SeldonMessage { + if m != nil { + return m.Response + } + return nil +} + +func init() { + proto.RegisterEnum("seldon.protos.Metric_MetricType", Metric_MetricType_name, Metric_MetricType_value) + proto.RegisterEnum("seldon.protos.Status_StatusFlag", Status_StatusFlag_name, Status_StatusFlag_value) + proto.RegisterType((*SeldonMessage)(nil), "seldon.protos.SeldonMessage") + proto.RegisterType((*DefaultData)(nil), "seldon.protos.DefaultData") + proto.RegisterType((*Tensor)(nil), "seldon.protos.Tensor") + proto.RegisterType((*Meta)(nil), "seldon.protos.Meta") + proto.RegisterMapType((map[string]string)(nil), "seldon.protos.Meta.RequestPathEntry") + proto.RegisterMapType((map[string]int32)(nil), "seldon.protos.Meta.RoutingEntry") + proto.RegisterMapType((map[string]*_struct.Value)(nil), "seldon.protos.Meta.TagsEntry") + proto.RegisterType((*Metric)(nil), "seldon.protos.Metric") + proto.RegisterMapType((map[string]string)(nil), "seldon.protos.Metric.TagsEntry") + proto.RegisterType((*SeldonMessageList)(nil), "seldon.protos.SeldonMessageList") + proto.RegisterType((*Status)(nil), "seldon.protos.Status") + proto.RegisterType((*Feedback)(nil), "seldon.protos.Feedback") + proto.RegisterType((*RequestResponse)(nil), "seldon.protos.RequestResponse") +} + +func init() { + proto.RegisterFile("prediction.proto", fileDescriptor_430b55197713f541) +} + +var fileDescriptor_430b55197713f541 = []byte{ + // 1078 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xdd, 0x6e, 0x1b, 0x45, + 0x14, 0xf6, 0xda, 0x5e, 0x3b, 0x3e, 0x4e, 0x5b, 0x77, 0xe8, 0x8f, 0xb1, 0x8a, 0xb0, 0x2c, 0x54, + 0x72, 0x41, 0xbd, 0xe0, 0x96, 0x12, 0xe5, 0xa2, 0x52, 0x7e, 0x9c, 0x1f, 0xa9, 0x69, 0xa2, 0xb1, + 0x83, 0x54, 0x24, 0x84, 0xc6, 0xde, 0xf1, 0x66, 0x89, 0xbd, 0xb3, 0xcc, 0xcc, 0x12, 0xf9, 0x1a, + 0x71, 0xc1, 0x1b, 0x00, 0x8f, 0xc0, 0x93, 0x70, 0x83, 0x10, 0x6f, 0x84, 0xe6, 0x67, 0x1d, 0x67, + 0xeb, 0x3a, 0x17, 0xb1, 0x10, 0x57, 0x99, 0x39, 0xe7, 0xfb, 0xce, 0x99, 0x73, 0xe6, 0x3b, 0x93, + 0x35, 0xd4, 0x62, 0x4e, 0xfd, 0x70, 0x28, 0x43, 0x16, 0xb5, 0x63, 0xce, 0x24, 0x43, 0x77, 0x04, + 0x1d, 0xfb, 0xe9, 0x4e, 0x34, 0x3e, 0x0c, 0x18, 0x0b, 0xc6, 0xd4, 0xd3, 0xdb, 0x41, 0x32, 0xf2, + 0x48, 0x34, 0x35, 0xbe, 0xc6, 0x93, 0xac, 0x4b, 0x48, 0x9e, 0x0c, 0xa5, 0xf5, 0x3e, 0x95, 0x34, + 0x12, 0x8c, 0x8f, 0xc6, 0xec, 0xd2, 0x1b, 0x32, 0x4e, 0xbd, 0x11, 0x27, 0x13, 0x7a, 0xc9, 0xf8, + 0x85, 0x67, 0x3c, 0x06, 0xd7, 0xfa, 0x2b, 0x0f, 0x77, 0x7a, 0x3a, 0xe5, 0x31, 0x15, 0x82, 0x04, + 0x14, 0x3d, 0x83, 0x92, 0x90, 0x44, 0x26, 0xa2, 0xee, 0x34, 0x9d, 0x8d, 0x6a, 0xe7, 0x61, 0xfb, + 0xda, 0x91, 0xda, 0x3d, 0xed, 0xc4, 0x16, 0x84, 0x3e, 0x85, 0xe2, 0x84, 0x4a, 0x52, 0xcf, 0x6b, + 0xf0, 0x07, 0x19, 0xf0, 0x31, 0x95, 0x04, 0x6b, 0x00, 0xfa, 0x1c, 0x8a, 0x3e, 0x91, 0xa4, 0x5e, + 0xd0, 0xc0, 0x46, 0x06, 0xb8, 0x47, 0x47, 0x24, 0x19, 0xcb, 0x3d, 0x22, 0xc9, 0x61, 0x0e, 0x6b, + 0x24, 0x6a, 0x40, 0x79, 0x10, 0x46, 0xca, 0x54, 0x2f, 0x36, 0x9d, 0x8d, 0xf5, 0xc3, 0x1c, 0x4e, + 0x0d, 0xca, 0x27, 0x24, 0xd7, 0x3e, 0xb7, 0xe9, 0x6c, 0x54, 0x94, 0xcf, 0x1a, 0xd0, 0x0b, 0x58, + 0xfb, 0x5e, 0x30, 0x43, 0x2c, 0xe9, 0x6c, 0x8f, 0xda, 0xa6, 0x59, 0xed, 0xb4, 0x59, 0xed, 0xaf, + 0xc9, 0x38, 0xa1, 0x87, 0x39, 0x3c, 0x43, 0xa2, 0x97, 0x00, 0xc3, 0x44, 0x48, 0x36, 0xd1, 0xbc, + 0xb2, 0xe6, 0x3d, 0x78, 0x87, 0xb7, 0x1d, 0x4d, 0x0f, 0x73, 0x78, 0x0e, 0xb9, 0xb3, 0x0e, 0xa0, + 0x4e, 0xfb, 0x1d, 0x8b, 0x28, 0x1b, 0xb5, 0xfe, 0x71, 0xa0, 0x3a, 0x57, 0x0b, 0x7a, 0x00, 0x6e, + 0x44, 0x26, 0x54, 0x35, 0xb3, 0xb0, 0x51, 0xc1, 0x66, 0x83, 0x3c, 0x28, 0x99, 0x5b, 0xb0, 0x6d, + 0xcb, 0xf6, 0xb8, 0xaf, 0x9d, 0x87, 0x39, 0x6c, 0x61, 0xe8, 0x25, 0x94, 0x23, 0x9f, 0x70, 0x4e, + 0xa6, 0xb3, 0xfe, 0x65, 0x4f, 0xf6, 0x3a, 0x14, 0x32, 0xad, 0x2a, 0x05, 0xa3, 0x2f, 0x61, 0x4d, + 0x8e, 0x6c, 0xaa, 0xa2, 0x26, 0x3e, 0x6e, 0x5f, 0x29, 0xc3, 0xe6, 0x39, 0x55, 0x21, 0x54, 0x2f, + 0x52, 0x68, 0xa6, 0xa6, 0x57, 0x50, 0x32, 0x40, 0x54, 0x07, 0x57, 0x9c, 0x93, 0x98, 0xea, 0x6a, + 0xdc, 0x9d, 0x7c, 0xcd, 0xc1, 0xc6, 0x80, 0x1a, 0x50, 0xfa, 0x51, 0x25, 0x17, 0xf5, 0x7c, 0xb3, + 0xb0, 0xe1, 0x68, 0x97, 0xb5, 0xb4, 0xfe, 0x2e, 0x40, 0x51, 0x09, 0x01, 0x21, 0x28, 0xc6, 0x49, + 0xe8, 0x6b, 0x61, 0x55, 0xb0, 0x5e, 0xa3, 0x2f, 0xa0, 0x28, 0x49, 0x60, 0x68, 0xd5, 0xce, 0x47, + 0x0b, 0xf4, 0xd3, 0xee, 0x93, 0x40, 0x74, 0x23, 0xc9, 0xa7, 0x58, 0x43, 0xd1, 0x16, 0x94, 0x39, + 0x4b, 0x64, 0x18, 0x05, 0xf5, 0x82, 0x66, 0x35, 0x17, 0xb1, 0xb0, 0x81, 0x18, 0x62, 0x4a, 0x40, + 0xfb, 0x50, 0xe5, 0xf4, 0x87, 0x84, 0x0a, 0x79, 0x4a, 0xe4, 0x79, 0xbd, 0xa8, 0xf9, 0x9f, 0x2c, + 0xe4, 0x5f, 0xc1, 0x4c, 0x8c, 0x79, 0x22, 0xf2, 0xa0, 0x3c, 0xa1, 0x92, 0x87, 0x43, 0x51, 0x77, + 0x75, 0x8c, 0x87, 0xef, 0xc6, 0xe0, 0xe1, 0x10, 0xa7, 0xa8, 0xc6, 0x09, 0x54, 0x66, 0x75, 0xa0, + 0x1a, 0x14, 0x2e, 0xe8, 0xd4, 0xf6, 0x41, 0x2d, 0xd1, 0x67, 0xe0, 0xea, 0x6e, 0x59, 0x41, 0xbc, + 0x47, 0xb0, 0xd8, 0x80, 0xb6, 0xf2, 0x9b, 0x4e, 0x63, 0x0b, 0xd6, 0xe7, 0x4b, 0x5c, 0x10, 0xf3, + 0xc1, 0x7c, 0x4c, 0x77, 0x9e, 0xfb, 0x0a, 0x6a, 0xd9, 0xf2, 0x6e, 0xe2, 0x57, 0xe6, 0xf8, 0xad, + 0x9f, 0xf3, 0x50, 0x32, 0x05, 0x2e, 0xa0, 0xbd, 0x80, 0xa2, 0x9c, 0xc6, 0x86, 0x75, 0x77, 0xd1, + 0xdd, 0xf0, 0x70, 0x68, 0xff, 0xf4, 0xa7, 0x31, 0xc5, 0x1a, 0x7d, 0x95, 0x4c, 0xe9, 0x3b, 0x6f, + 0x93, 0xa1, 0xe7, 0x56, 0x1d, 0xe6, 0x9e, 0x3e, 0x5e, 0x1c, 0x2b, 0xa3, 0x8f, 0xc6, 0x57, 0xcb, + 0x5b, 0xfd, 0xfe, 0xb2, 0x3c, 0x80, 0xab, 0x73, 0xa1, 0x2a, 0x94, 0x77, 0x4f, 0xce, 0xde, 0xf4, + 0xbb, 0xb8, 0x96, 0x43, 0x15, 0x70, 0x0f, 0xb6, 0xcf, 0x0e, 0xba, 0x35, 0x47, 0x2d, 0xfb, 0x47, + 0xc7, 0x5d, 0x5c, 0xcb, 0xb7, 0xde, 0xc2, 0xfd, 0x6b, 0x8f, 0xa7, 0x9a, 0x41, 0xb4, 0x07, 0x77, + 0xc5, 0xbc, 0xd1, 0xcc, 0x7e, 0xb5, 0xf3, 0x24, 0xfb, 0x90, 0xce, 0x83, 0x70, 0x86, 0xd3, 0xfa, + 0xc3, 0x81, 0x92, 0x79, 0x6a, 0xd5, 0xd8, 0x0c, 0x99, 0x4f, 0x75, 0x0d, 0x2e, 0xd6, 0x6b, 0x65, + 0x0b, 0xa3, 0x11, 0xb3, 0x35, 0xe8, 0x35, 0x7a, 0x04, 0x25, 0x4e, 0x89, 0x60, 0x91, 0xee, 0x61, + 0x05, 0xdb, 0x1d, 0xda, 0x9c, 0xbd, 0xe8, 0xc5, 0x85, 0x57, 0x62, 0xd2, 0xd8, 0x3f, 0xfb, 0x63, + 0x12, 0xa4, 0x8f, 0x7b, 0xeb, 0x29, 0xc0, 0x95, 0x55, 0x35, 0xa4, 0x77, 0xb6, 0xbb, 0xdb, 0xed, + 0xf5, 0x6a, 0x39, 0xb5, 0xd9, 0xdf, 0x3e, 0x7a, 0x7d, 0x86, 0xbb, 0x35, 0xa7, 0xf5, 0xa7, 0x03, + 0x6b, 0xfb, 0x94, 0xfa, 0x03, 0x32, 0xbc, 0x50, 0x6f, 0x95, 0x9d, 0x14, 0xfb, 0x1f, 0x64, 0x79, + 0xe1, 0x29, 0x18, 0x6d, 0xc2, 0x1a, 0xa7, 0x22, 0x66, 0x91, 0x48, 0xa7, 0x60, 0x39, 0x71, 0x86, + 0x36, 0x85, 0x5f, 0x12, 0xee, 0x5b, 0xf1, 0xd8, 0x1d, 0xea, 0x80, 0x2b, 0x79, 0xa2, 0xc7, 0xfc, + 0xe6, 0x70, 0x06, 0xda, 0xfa, 0xc9, 0x81, 0x7b, 0x76, 0x36, 0x70, 0x1a, 0xff, 0x3f, 0xaf, 0xa8, + 0xf3, 0x4b, 0x01, 0xca, 0x07, 0x34, 0xa2, 0x6a, 0xc2, 0xde, 0xc0, 0xdd, 0x3e, 0x27, 0x91, 0x18, + 0x31, 0x3e, 0x39, 0x8a, 0xe2, 0x44, 0xa2, 0xa5, 0x51, 0x1a, 0x4b, 0xbd, 0xad, 0x1c, 0x3a, 0x81, + 0x7b, 0xb3, 0x78, 0x27, 0x89, 0xbc, 0x7d, 0xc0, 0x2e, 0xb8, 0xea, 0x25, 0xa2, 0xb7, 0x0c, 0x73, + 0x0c, 0x95, 0xed, 0x20, 0xe0, 0x34, 0x20, 0x92, 0xa2, 0xe6, 0x32, 0xb0, 0x1a, 0xb3, 0x1b, 0xc3, + 0x1d, 0xc0, 0x7a, 0x8f, 0x46, 0xfe, 0x4c, 0x96, 0x8f, 0x33, 0xf8, 0xd4, 0x71, 0x53, 0xa0, 0xce, + 0x6f, 0x0e, 0xb8, 0xc7, 0xcc, 0xa7, 0x63, 0x74, 0x00, 0xe5, 0x53, 0xf3, 0xc1, 0x76, 0xcb, 0x52, + 0x57, 0x76, 0xb6, 0x5f, 0x1d, 0x28, 0xe9, 0xde, 0xf3, 0x55, 0xdd, 0xc2, 0xca, 0x8e, 0xf6, 0x2d, + 0x54, 0x67, 0x32, 0xa3, 0x7c, 0xd5, 0x2a, 0xee, 0xf8, 0x70, 0xdf, 0x88, 0x77, 0x3e, 0xc9, 0xaa, + 0xa5, 0xdd, 0x79, 0x0b, 0x6b, 0xbb, 0x6c, 0x32, 0x08, 0x23, 0xca, 0x57, 0xac, 0xcf, 0xce, 0xef, + 0xea, 0x81, 0xd7, 0xb6, 0xff, 0x9f, 0xae, 0x76, 0xce, 0xa1, 0x16, 0xb2, 0xeb, 0x98, 0x9d, 0xda, + 0xe9, 0xec, 0xc7, 0x8a, 0xfe, 0x62, 0x14, 0xdf, 0xec, 0x04, 0xa1, 0x3c, 0x4f, 0x06, 0xed, 0x21, + 0x9b, 0x78, 0x06, 0x1b, 0x32, 0xbb, 0x78, 0xa6, 0x7f, 0x74, 0x84, 0xd1, 0x30, 0x19, 0x10, 0xf5, + 0x8d, 0xe2, 0x5d, 0x72, 0x12, 0xc7, 0x94, 0x0b, 0x4f, 0x74, 0x42, 0x2f, 0x60, 0x5e, 0x7c, 0x11, + 0x78, 0x24, 0x0e, 0x07, 0x25, 0x1d, 0xfd, 0xf9, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xae, 0x71, + 0x67, 0xd8, 0x0b, 0x0d, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// GenericClient is the client API for Generic service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type GenericClient interface { + TransformInput(ctx context.Context, in *SeldonMessage, opts ...grpc.CallOption) (*SeldonMessage, error) + TransformOutput(ctx context.Context, in *SeldonMessage, opts ...grpc.CallOption) (*SeldonMessage, error) + Route(ctx context.Context, in *SeldonMessage, opts ...grpc.CallOption) (*SeldonMessage, error) + Aggregate(ctx context.Context, in *SeldonMessageList, opts ...grpc.CallOption) (*SeldonMessage, error) + SendFeedback(ctx context.Context, in *Feedback, opts ...grpc.CallOption) (*SeldonMessage, error) +} + +type genericClient struct { + cc grpc.ClientConnInterface +} + +func NewGenericClient(cc grpc.ClientConnInterface) GenericClient { + return &genericClient{cc} +} + +func (c *genericClient) TransformInput(ctx context.Context, in *SeldonMessage, opts ...grpc.CallOption) (*SeldonMessage, error) { + out := new(SeldonMessage) + err := c.cc.Invoke(ctx, "/seldon.protos.Generic/TransformInput", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *genericClient) TransformOutput(ctx context.Context, in *SeldonMessage, opts ...grpc.CallOption) (*SeldonMessage, error) { + out := new(SeldonMessage) + err := c.cc.Invoke(ctx, "/seldon.protos.Generic/TransformOutput", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *genericClient) Route(ctx context.Context, in *SeldonMessage, opts ...grpc.CallOption) (*SeldonMessage, error) { + out := new(SeldonMessage) + err := c.cc.Invoke(ctx, "/seldon.protos.Generic/Route", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *genericClient) Aggregate(ctx context.Context, in *SeldonMessageList, opts ...grpc.CallOption) (*SeldonMessage, error) { + out := new(SeldonMessage) + err := c.cc.Invoke(ctx, "/seldon.protos.Generic/Aggregate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *genericClient) SendFeedback(ctx context.Context, in *Feedback, opts ...grpc.CallOption) (*SeldonMessage, error) { + out := new(SeldonMessage) + err := c.cc.Invoke(ctx, "/seldon.protos.Generic/SendFeedback", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// GenericServer is the server API for Generic service. +type GenericServer interface { + TransformInput(context.Context, *SeldonMessage) (*SeldonMessage, error) + TransformOutput(context.Context, *SeldonMessage) (*SeldonMessage, error) + Route(context.Context, *SeldonMessage) (*SeldonMessage, error) + Aggregate(context.Context, *SeldonMessageList) (*SeldonMessage, error) + SendFeedback(context.Context, *Feedback) (*SeldonMessage, error) +} + +// UnimplementedGenericServer can be embedded to have forward compatible implementations. +type UnimplementedGenericServer struct { +} + +func (*UnimplementedGenericServer) TransformInput(ctx context.Context, req *SeldonMessage) (*SeldonMessage, error) { + return nil, status.Errorf(codes.Unimplemented, "method TransformInput not implemented") +} +func (*UnimplementedGenericServer) TransformOutput(ctx context.Context, req *SeldonMessage) (*SeldonMessage, error) { + return nil, status.Errorf(codes.Unimplemented, "method TransformOutput not implemented") +} +func (*UnimplementedGenericServer) Route(ctx context.Context, req *SeldonMessage) (*SeldonMessage, error) { + return nil, status.Errorf(codes.Unimplemented, "method Route not implemented") +} +func (*UnimplementedGenericServer) Aggregate(ctx context.Context, req *SeldonMessageList) (*SeldonMessage, error) { + return nil, status.Errorf(codes.Unimplemented, "method Aggregate not implemented") +} +func (*UnimplementedGenericServer) SendFeedback(ctx context.Context, req *Feedback) (*SeldonMessage, error) { + return nil, status.Errorf(codes.Unimplemented, "method SendFeedback not implemented") +} + +func RegisterGenericServer(s *grpc.Server, srv GenericServer) { + s.RegisterService(&_Generic_serviceDesc, srv) +} + +func _Generic_TransformInput_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SeldonMessage) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GenericServer).TransformInput(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seldon.protos.Generic/TransformInput", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GenericServer).TransformInput(ctx, req.(*SeldonMessage)) + } + return interceptor(ctx, in, info, handler) +} + +func _Generic_TransformOutput_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SeldonMessage) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GenericServer).TransformOutput(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seldon.protos.Generic/TransformOutput", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GenericServer).TransformOutput(ctx, req.(*SeldonMessage)) + } + return interceptor(ctx, in, info, handler) +} + +func _Generic_Route_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SeldonMessage) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GenericServer).Route(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seldon.protos.Generic/Route", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GenericServer).Route(ctx, req.(*SeldonMessage)) + } + return interceptor(ctx, in, info, handler) +} + +func _Generic_Aggregate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SeldonMessageList) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GenericServer).Aggregate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seldon.protos.Generic/Aggregate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GenericServer).Aggregate(ctx, req.(*SeldonMessageList)) + } + return interceptor(ctx, in, info, handler) +} + +func _Generic_SendFeedback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Feedback) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GenericServer).SendFeedback(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seldon.protos.Generic/SendFeedback", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GenericServer).SendFeedback(ctx, req.(*Feedback)) + } + return interceptor(ctx, in, info, handler) +} + +var _Generic_serviceDesc = grpc.ServiceDesc{ + ServiceName: "seldon.protos.Generic", + HandlerType: (*GenericServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "TransformInput", + Handler: _Generic_TransformInput_Handler, + }, + { + MethodName: "TransformOutput", + Handler: _Generic_TransformOutput_Handler, + }, + { + MethodName: "Route", + Handler: _Generic_Route_Handler, + }, + { + MethodName: "Aggregate", + Handler: _Generic_Aggregate_Handler, + }, + { + MethodName: "SendFeedback", + Handler: _Generic_SendFeedback_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "prediction.proto", +} + +// ModelClient is the client API for Model service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ModelClient interface { + Predict(ctx context.Context, in *SeldonMessage, opts ...grpc.CallOption) (*SeldonMessage, error) + SendFeedback(ctx context.Context, in *Feedback, opts ...grpc.CallOption) (*SeldonMessage, error) +} + +type modelClient struct { + cc grpc.ClientConnInterface +} + +func NewModelClient(cc grpc.ClientConnInterface) ModelClient { + return &modelClient{cc} +} + +func (c *modelClient) Predict(ctx context.Context, in *SeldonMessage, opts ...grpc.CallOption) (*SeldonMessage, error) { + out := new(SeldonMessage) + err := c.cc.Invoke(ctx, "/seldon.protos.Model/Predict", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *modelClient) SendFeedback(ctx context.Context, in *Feedback, opts ...grpc.CallOption) (*SeldonMessage, error) { + out := new(SeldonMessage) + err := c.cc.Invoke(ctx, "/seldon.protos.Model/SendFeedback", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ModelServer is the server API for Model service. +type ModelServer interface { + Predict(context.Context, *SeldonMessage) (*SeldonMessage, error) + SendFeedback(context.Context, *Feedback) (*SeldonMessage, error) +} + +// UnimplementedModelServer can be embedded to have forward compatible implementations. +type UnimplementedModelServer struct { +} + +func (*UnimplementedModelServer) Predict(ctx context.Context, req *SeldonMessage) (*SeldonMessage, error) { + return nil, status.Errorf(codes.Unimplemented, "method Predict not implemented") +} +func (*UnimplementedModelServer) SendFeedback(ctx context.Context, req *Feedback) (*SeldonMessage, error) { + return nil, status.Errorf(codes.Unimplemented, "method SendFeedback not implemented") +} + +func RegisterModelServer(s *grpc.Server, srv ModelServer) { + s.RegisterService(&_Model_serviceDesc, srv) +} + +func _Model_Predict_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SeldonMessage) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ModelServer).Predict(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seldon.protos.Model/Predict", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ModelServer).Predict(ctx, req.(*SeldonMessage)) + } + return interceptor(ctx, in, info, handler) +} + +func _Model_SendFeedback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Feedback) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ModelServer).SendFeedback(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seldon.protos.Model/SendFeedback", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ModelServer).SendFeedback(ctx, req.(*Feedback)) + } + return interceptor(ctx, in, info, handler) +} + +var _Model_serviceDesc = grpc.ServiceDesc{ + ServiceName: "seldon.protos.Model", + HandlerType: (*ModelServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Predict", + Handler: _Model_Predict_Handler, + }, + { + MethodName: "SendFeedback", + Handler: _Model_SendFeedback_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "prediction.proto", +} + +// RouterClient is the client API for Router service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type RouterClient interface { + Route(ctx context.Context, in *SeldonMessage, opts ...grpc.CallOption) (*SeldonMessage, error) + SendFeedback(ctx context.Context, in *Feedback, opts ...grpc.CallOption) (*SeldonMessage, error) +} + +type routerClient struct { + cc grpc.ClientConnInterface +} + +func NewRouterClient(cc grpc.ClientConnInterface) RouterClient { + return &routerClient{cc} +} + +func (c *routerClient) Route(ctx context.Context, in *SeldonMessage, opts ...grpc.CallOption) (*SeldonMessage, error) { + out := new(SeldonMessage) + err := c.cc.Invoke(ctx, "/seldon.protos.Router/Route", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *routerClient) SendFeedback(ctx context.Context, in *Feedback, opts ...grpc.CallOption) (*SeldonMessage, error) { + out := new(SeldonMessage) + err := c.cc.Invoke(ctx, "/seldon.protos.Router/SendFeedback", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RouterServer is the server API for Router service. +type RouterServer interface { + Route(context.Context, *SeldonMessage) (*SeldonMessage, error) + SendFeedback(context.Context, *Feedback) (*SeldonMessage, error) +} + +// UnimplementedRouterServer can be embedded to have forward compatible implementations. +type UnimplementedRouterServer struct { +} + +func (*UnimplementedRouterServer) Route(ctx context.Context, req *SeldonMessage) (*SeldonMessage, error) { + return nil, status.Errorf(codes.Unimplemented, "method Route not implemented") +} +func (*UnimplementedRouterServer) SendFeedback(ctx context.Context, req *Feedback) (*SeldonMessage, error) { + return nil, status.Errorf(codes.Unimplemented, "method SendFeedback not implemented") +} + +func RegisterRouterServer(s *grpc.Server, srv RouterServer) { + s.RegisterService(&_Router_serviceDesc, srv) +} + +func _Router_Route_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SeldonMessage) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RouterServer).Route(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seldon.protos.Router/Route", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RouterServer).Route(ctx, req.(*SeldonMessage)) + } + return interceptor(ctx, in, info, handler) +} + +func _Router_SendFeedback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Feedback) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RouterServer).SendFeedback(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seldon.protos.Router/SendFeedback", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RouterServer).SendFeedback(ctx, req.(*Feedback)) + } + return interceptor(ctx, in, info, handler) +} + +var _Router_serviceDesc = grpc.ServiceDesc{ + ServiceName: "seldon.protos.Router", + HandlerType: (*RouterServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Route", + Handler: _Router_Route_Handler, + }, + { + MethodName: "SendFeedback", + Handler: _Router_SendFeedback_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "prediction.proto", +} + +// TransformerClient is the client API for Transformer service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type TransformerClient interface { + TransformInput(ctx context.Context, in *SeldonMessage, opts ...grpc.CallOption) (*SeldonMessage, error) +} + +type transformerClient struct { + cc grpc.ClientConnInterface +} + +func NewTransformerClient(cc grpc.ClientConnInterface) TransformerClient { + return &transformerClient{cc} +} + +func (c *transformerClient) TransformInput(ctx context.Context, in *SeldonMessage, opts ...grpc.CallOption) (*SeldonMessage, error) { + out := new(SeldonMessage) + err := c.cc.Invoke(ctx, "/seldon.protos.Transformer/TransformInput", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TransformerServer is the server API for Transformer service. +type TransformerServer interface { + TransformInput(context.Context, *SeldonMessage) (*SeldonMessage, error) +} + +// UnimplementedTransformerServer can be embedded to have forward compatible implementations. +type UnimplementedTransformerServer struct { +} + +func (*UnimplementedTransformerServer) TransformInput(ctx context.Context, req *SeldonMessage) (*SeldonMessage, error) { + return nil, status.Errorf(codes.Unimplemented, "method TransformInput not implemented") +} + +func RegisterTransformerServer(s *grpc.Server, srv TransformerServer) { + s.RegisterService(&_Transformer_serviceDesc, srv) +} + +func _Transformer_TransformInput_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SeldonMessage) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransformerServer).TransformInput(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seldon.protos.Transformer/TransformInput", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransformerServer).TransformInput(ctx, req.(*SeldonMessage)) + } + return interceptor(ctx, in, info, handler) +} + +var _Transformer_serviceDesc = grpc.ServiceDesc{ + ServiceName: "seldon.protos.Transformer", + HandlerType: (*TransformerServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "TransformInput", + Handler: _Transformer_TransformInput_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "prediction.proto", +} + +// OutputTransformerClient is the client API for OutputTransformer service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type OutputTransformerClient interface { + TransformOutput(ctx context.Context, in *SeldonMessage, opts ...grpc.CallOption) (*SeldonMessage, error) +} + +type outputTransformerClient struct { + cc grpc.ClientConnInterface +} + +func NewOutputTransformerClient(cc grpc.ClientConnInterface) OutputTransformerClient { + return &outputTransformerClient{cc} +} + +func (c *outputTransformerClient) TransformOutput(ctx context.Context, in *SeldonMessage, opts ...grpc.CallOption) (*SeldonMessage, error) { + out := new(SeldonMessage) + err := c.cc.Invoke(ctx, "/seldon.protos.OutputTransformer/TransformOutput", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// OutputTransformerServer is the server API for OutputTransformer service. +type OutputTransformerServer interface { + TransformOutput(context.Context, *SeldonMessage) (*SeldonMessage, error) +} + +// UnimplementedOutputTransformerServer can be embedded to have forward compatible implementations. +type UnimplementedOutputTransformerServer struct { +} + +func (*UnimplementedOutputTransformerServer) TransformOutput(ctx context.Context, req *SeldonMessage) (*SeldonMessage, error) { + return nil, status.Errorf(codes.Unimplemented, "method TransformOutput not implemented") +} + +func RegisterOutputTransformerServer(s *grpc.Server, srv OutputTransformerServer) { + s.RegisterService(&_OutputTransformer_serviceDesc, srv) +} + +func _OutputTransformer_TransformOutput_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SeldonMessage) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OutputTransformerServer).TransformOutput(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seldon.protos.OutputTransformer/TransformOutput", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OutputTransformerServer).TransformOutput(ctx, req.(*SeldonMessage)) + } + return interceptor(ctx, in, info, handler) +} + +var _OutputTransformer_serviceDesc = grpc.ServiceDesc{ + ServiceName: "seldon.protos.OutputTransformer", + HandlerType: (*OutputTransformerServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "TransformOutput", + Handler: _OutputTransformer_TransformOutput_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "prediction.proto", +} + +// CombinerClient is the client API for Combiner service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type CombinerClient interface { + Aggregate(ctx context.Context, in *SeldonMessageList, opts ...grpc.CallOption) (*SeldonMessage, error) +} + +type combinerClient struct { + cc grpc.ClientConnInterface +} + +func NewCombinerClient(cc grpc.ClientConnInterface) CombinerClient { + return &combinerClient{cc} +} + +func (c *combinerClient) Aggregate(ctx context.Context, in *SeldonMessageList, opts ...grpc.CallOption) (*SeldonMessage, error) { + out := new(SeldonMessage) + err := c.cc.Invoke(ctx, "/seldon.protos.Combiner/Aggregate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CombinerServer is the server API for Combiner service. +type CombinerServer interface { + Aggregate(context.Context, *SeldonMessageList) (*SeldonMessage, error) +} + +// UnimplementedCombinerServer can be embedded to have forward compatible implementations. +type UnimplementedCombinerServer struct { +} + +func (*UnimplementedCombinerServer) Aggregate(ctx context.Context, req *SeldonMessageList) (*SeldonMessage, error) { + return nil, status.Errorf(codes.Unimplemented, "method Aggregate not implemented") +} + +func RegisterCombinerServer(s *grpc.Server, srv CombinerServer) { + s.RegisterService(&_Combiner_serviceDesc, srv) +} + +func _Combiner_Aggregate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SeldonMessageList) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CombinerServer).Aggregate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seldon.protos.Combiner/Aggregate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CombinerServer).Aggregate(ctx, req.(*SeldonMessageList)) + } + return interceptor(ctx, in, info, handler) +} + +var _Combiner_serviceDesc = grpc.ServiceDesc{ + ServiceName: "seldon.protos.Combiner", + HandlerType: (*CombinerServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Aggregate", + Handler: _Combiner_Aggregate_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "prediction.proto", +} + +// SeldonClient is the client API for Seldon service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type SeldonClient interface { + Predict(ctx context.Context, in *SeldonMessage, opts ...grpc.CallOption) (*SeldonMessage, error) + SendFeedback(ctx context.Context, in *Feedback, opts ...grpc.CallOption) (*SeldonMessage, error) +} + +type seldonClient struct { + cc grpc.ClientConnInterface +} + +func NewSeldonClient(cc grpc.ClientConnInterface) SeldonClient { + return &seldonClient{cc} +} + +func (c *seldonClient) Predict(ctx context.Context, in *SeldonMessage, opts ...grpc.CallOption) (*SeldonMessage, error) { + out := new(SeldonMessage) + err := c.cc.Invoke(ctx, "/seldon.protos.Seldon/Predict", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *seldonClient) SendFeedback(ctx context.Context, in *Feedback, opts ...grpc.CallOption) (*SeldonMessage, error) { + out := new(SeldonMessage) + err := c.cc.Invoke(ctx, "/seldon.protos.Seldon/SendFeedback", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SeldonServer is the server API for Seldon service. +type SeldonServer interface { + Predict(context.Context, *SeldonMessage) (*SeldonMessage, error) + SendFeedback(context.Context, *Feedback) (*SeldonMessage, error) +} + +// UnimplementedSeldonServer can be embedded to have forward compatible implementations. +type UnimplementedSeldonServer struct { +} + +func (*UnimplementedSeldonServer) Predict(ctx context.Context, req *SeldonMessage) (*SeldonMessage, error) { + return nil, status.Errorf(codes.Unimplemented, "method Predict not implemented") +} +func (*UnimplementedSeldonServer) SendFeedback(ctx context.Context, req *Feedback) (*SeldonMessage, error) { + return nil, status.Errorf(codes.Unimplemented, "method SendFeedback not implemented") +} + +func RegisterSeldonServer(s *grpc.Server, srv SeldonServer) { + s.RegisterService(&_Seldon_serviceDesc, srv) +} + +func _Seldon_Predict_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SeldonMessage) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SeldonServer).Predict(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seldon.protos.Seldon/Predict", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SeldonServer).Predict(ctx, req.(*SeldonMessage)) + } + return interceptor(ctx, in, info, handler) +} + +func _Seldon_SendFeedback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Feedback) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SeldonServer).SendFeedback(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seldon.protos.Seldon/SendFeedback", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SeldonServer).SendFeedback(ctx, req.(*Feedback)) + } + return interceptor(ctx, in, info, handler) +} + +var _Seldon_serviceDesc = grpc.ServiceDesc{ + ServiceName: "seldon.protos.Seldon", + HandlerType: (*SeldonServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Predict", + Handler: _Seldon_Predict_Handler, + }, + { + MethodName: "SendFeedback", + Handler: _Seldon_SendFeedback_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "prediction.proto", +} diff --git a/proto/prediction.proto b/proto/prediction.proto index de9d69e1d7..174f315060 100644 --- a/proto/prediction.proto +++ b/proto/prediction.proto @@ -1,5 +1,6 @@ syntax = "proto3"; +import "google/protobuf/any.proto"; import "google/protobuf/struct.proto"; import "tensorflow/core/framework/tensor.proto"; @@ -20,6 +21,7 @@ message SeldonMessage { bytes binData = 4; string strData = 5; google.protobuf.Value jsonData = 6; + google.protobuf.Any customData = 7; } } @@ -38,7 +40,7 @@ message Tensor { } message Meta { - string puid = 1; + string puid = 1; map tags = 2; map routing = 3; map requestPath = 4; @@ -101,7 +103,7 @@ service Generic { service Model { rpc Predict(SeldonMessage) returns (SeldonMessage) {}; - rpc SendFeedback(Feedback) returns (SeldonMessage) {}; + rpc SendFeedback(Feedback) returns (SeldonMessage) {}; } service Router { diff --git a/python/seldon_core/proto/prediction.proto b/python/seldon_core/proto/prediction.proto index de9d69e1d7..174f315060 100644 --- a/python/seldon_core/proto/prediction.proto +++ b/python/seldon_core/proto/prediction.proto @@ -1,5 +1,6 @@ syntax = "proto3"; +import "google/protobuf/any.proto"; import "google/protobuf/struct.proto"; import "tensorflow/core/framework/tensor.proto"; @@ -20,6 +21,7 @@ message SeldonMessage { bytes binData = 4; string strData = 5; google.protobuf.Value jsonData = 6; + google.protobuf.Any customData = 7; } } @@ -38,7 +40,7 @@ message Tensor { } message Meta { - string puid = 1; + string puid = 1; map tags = 2; map routing = 3; map requestPath = 4; @@ -101,7 +103,7 @@ service Generic { service Model { rpc Predict(SeldonMessage) returns (SeldonMessage) {}; - rpc SendFeedback(Feedback) returns (SeldonMessage) {}; + rpc SendFeedback(Feedback) returns (SeldonMessage) {}; } service Router { diff --git a/python/seldon_core/proto/prediction_pb2.py b/python/seldon_core/proto/prediction_pb2.py index c64f0d891f..810ab9c550 100644 --- a/python/seldon_core/proto/prediction_pb2.py +++ b/python/seldon_core/proto/prediction_pb2.py @@ -2,1067 +2,1583 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: proto/prediction.proto -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() +from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 -from seldon_core.proto.tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2 +from seldon_core.proto.tensorflow.core.framework import ( + tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2, +) DESCRIPTOR = _descriptor.FileDescriptor( - name='proto/prediction.proto', - package='seldon.protos', - syntax='proto3', - serialized_options=_b('\n\020io.seldon.protosB\020PredictionProtosZBgithub.com/seldonio/seldon-core/incubating/wrappers/s2i/go/pkg/api'), - serialized_pb=_b('\n\x16proto/prediction.proto\x12\rseldon.protos\x1a\x1cgoogle/protobuf/struct.proto\x1a&tensorflow/core/framework/tensor.proto\"\xe5\x01\n\rSeldonMessage\x12%\n\x06status\x18\x01 \x01(\x0b\x32\x15.seldon.protos.Status\x12!\n\x04meta\x18\x02 \x01(\x0b\x32\x13.seldon.protos.Meta\x12*\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x1a.seldon.protos.DefaultDataH\x00\x12\x11\n\x07\x62inData\x18\x04 \x01(\x0cH\x00\x12\x11\n\x07strData\x18\x05 \x01(\tH\x00\x12*\n\x08jsonData\x18\x06 \x01(\x0b\x32\x16.google.protobuf.ValueH\x00\x42\x0c\n\ndata_oneof\"\xaf\x01\n\x0b\x44\x65\x66\x61ultData\x12\r\n\x05names\x18\x01 \x03(\t\x12\'\n\x06tensor\x18\x02 \x01(\x0b\x32\x15.seldon.protos.TensorH\x00\x12-\n\x07ndarray\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.ListValueH\x00\x12+\n\x08tftensor\x18\x04 \x01(\x0b\x32\x17.tensorflow.TensorProtoH\x00\x42\x0c\n\ndata_oneof\"/\n\x06Tensor\x12\x11\n\x05shape\x18\x01 \x03(\x05\x42\x02\x10\x01\x12\x12\n\x06values\x18\x02 \x03(\x01\x42\x02\x10\x01\"\x80\x03\n\x04Meta\x12\x0c\n\x04puid\x18\x01 \x01(\t\x12+\n\x04tags\x18\x02 \x03(\x0b\x32\x1d.seldon.protos.Meta.TagsEntry\x12\x31\n\x07routing\x18\x03 \x03(\x0b\x32 .seldon.protos.Meta.RoutingEntry\x12\x39\n\x0brequestPath\x18\x04 \x03(\x0b\x32$.seldon.protos.Meta.RequestPathEntry\x12&\n\x07metrics\x18\x05 \x03(\x0b\x32\x15.seldon.protos.Metric\x1a\x43\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a.\n\x0cRoutingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x32\n\x10RequestPathEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xe1\x01\n\x06Metric\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x04type\x18\x02 \x01(\x0e\x32 .seldon.protos.Metric.MetricType\x12\r\n\x05value\x18\x03 \x01(\x02\x12-\n\x04tags\x18\x04 \x03(\x0b\x32\x1f.seldon.protos.Metric.TagsEntry\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"/\n\nMetricType\x12\x0b\n\x07\x43OUNTER\x10\x00\x12\t\n\x05GAUGE\x10\x01\x12\t\n\x05TIMER\x10\x02\"I\n\x11SeldonMessageList\x12\x34\n\x0eseldonMessages\x18\x01 \x03(\x0b\x32\x1c.seldon.protos.SeldonMessage\"\x8e\x01\n\x06Status\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0c\n\x04info\x18\x02 \x01(\t\x12\x0e\n\x06reason\x18\x03 \x01(\t\x12\x30\n\x06status\x18\x04 \x01(\x0e\x32 .seldon.protos.Status.StatusFlag\"&\n\nStatusFlag\x12\x0b\n\x07SUCCESS\x10\x00\x12\x0b\n\x07\x46\x41ILURE\x10\x01\"\xa6\x01\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12-\n\x07request\x18\x01 \x01(\x0b\x32\x1c.seldon.protos.SeldonMessage\x12.\n\x08response\x18\x02 \x01(\x0b\x32\x1c.seldon.protos.SeldonMessage\x12\x0e\n\x06reward\x18\x03 \x01(\x02\x12+\n\x05truth\x18\x04 \x01(\x0b\x32\x1c.seldon.protos.SeldonMessage\"p\n\x0fRequestResponse\x12-\n\x07request\x18\x01 \x01(\x0b\x32\x1c.seldon.protos.SeldonMessage\x12.\n\x08response\x18\x02 \x01(\x0b\x32\x1c.seldon.protos.SeldonMessage2\x89\x03\n\x07Generic\x12N\n\x0eTransformInput\x12\x1c.seldon.protos.SeldonMessage\x1a\x1c.seldon.protos.SeldonMessage\"\x00\x12O\n\x0fTransformOutput\x12\x1c.seldon.protos.SeldonMessage\x1a\x1c.seldon.protos.SeldonMessage\"\x00\x12\x45\n\x05Route\x12\x1c.seldon.protos.SeldonMessage\x1a\x1c.seldon.protos.SeldonMessage\"\x00\x12M\n\tAggregate\x12 .seldon.protos.SeldonMessageList\x1a\x1c.seldon.protos.SeldonMessage\"\x00\x12G\n\x0cSendFeedback\x12\x17.seldon.protos.Feedback\x1a\x1c.seldon.protos.SeldonMessage\"\x00\x32\x99\x01\n\x05Model\x12G\n\x07Predict\x12\x1c.seldon.protos.SeldonMessage\x1a\x1c.seldon.protos.SeldonMessage\"\x00\x12G\n\x0cSendFeedback\x12\x17.seldon.protos.Feedback\x1a\x1c.seldon.protos.SeldonMessage\"\x00\x32\x98\x01\n\x06Router\x12\x45\n\x05Route\x12\x1c.seldon.protos.SeldonMessage\x1a\x1c.seldon.protos.SeldonMessage\"\x00\x12G\n\x0cSendFeedback\x12\x17.seldon.protos.Feedback\x1a\x1c.seldon.protos.SeldonMessage\"\x00\x32]\n\x0bTransformer\x12N\n\x0eTransformInput\x12\x1c.seldon.protos.SeldonMessage\x1a\x1c.seldon.protos.SeldonMessage\"\x00\x32\x64\n\x11OutputTransformer\x12O\n\x0fTransformOutput\x12\x1c.seldon.protos.SeldonMessage\x1a\x1c.seldon.protos.SeldonMessage\"\x00\x32Y\n\x08\x43ombiner\x12M\n\tAggregate\x12 .seldon.protos.SeldonMessageList\x1a\x1c.seldon.protos.SeldonMessage\"\x00\x32\x9a\x01\n\x06Seldon\x12G\n\x07Predict\x12\x1c.seldon.protos.SeldonMessage\x1a\x1c.seldon.protos.SeldonMessage\"\x00\x12G\n\x0cSendFeedback\x12\x17.seldon.protos.Feedback\x1a\x1c.seldon.protos.SeldonMessage\"\x00\x42h\n\x10io.seldon.protosB\x10PredictionProtosZBgithub.com/seldonio/seldon-core/incubating/wrappers/s2i/go/pkg/apib\x06proto3') - , - dependencies=[google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,tensorflow_dot_core_dot_framework_dot_tensor__pb2.DESCRIPTOR,]) - + name="proto/prediction.proto", + package="seldon.protos", + syntax="proto3", + serialized_options=b"\n\020io.seldon.protosB\020PredictionProtosZBgithub.com/seldonio/seldon-core/incubating/wrappers/s2i/go/pkg/api", + serialized_pb=b'\n\x16proto/prediction.proto\x12\rseldon.protos\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a&tensorflow/core/framework/tensor.proto"\x91\x02\n\rSeldonMessage\x12%\n\x06status\x18\x01 \x01(\x0b\x32\x15.seldon.protos.Status\x12!\n\x04meta\x18\x02 \x01(\x0b\x32\x13.seldon.protos.Meta\x12*\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x1a.seldon.protos.DefaultDataH\x00\x12\x11\n\x07\x62inData\x18\x04 \x01(\x0cH\x00\x12\x11\n\x07strData\x18\x05 \x01(\tH\x00\x12*\n\x08jsonData\x18\x06 \x01(\x0b\x32\x16.google.protobuf.ValueH\x00\x12*\n\ncustomData\x18\x07 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x42\x0c\n\ndata_oneof"\xaf\x01\n\x0b\x44\x65\x66\x61ultData\x12\r\n\x05names\x18\x01 \x03(\t\x12\'\n\x06tensor\x18\x02 \x01(\x0b\x32\x15.seldon.protos.TensorH\x00\x12-\n\x07ndarray\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.ListValueH\x00\x12+\n\x08tftensor\x18\x04 \x01(\x0b\x32\x17.tensorflow.TensorProtoH\x00\x42\x0c\n\ndata_oneof"/\n\x06Tensor\x12\x11\n\x05shape\x18\x01 \x03(\x05\x42\x02\x10\x01\x12\x12\n\x06values\x18\x02 \x03(\x01\x42\x02\x10\x01"\x80\x03\n\x04Meta\x12\x0c\n\x04puid\x18\x01 \x01(\t\x12+\n\x04tags\x18\x02 \x03(\x0b\x32\x1d.seldon.protos.Meta.TagsEntry\x12\x31\n\x07routing\x18\x03 \x03(\x0b\x32 .seldon.protos.Meta.RoutingEntry\x12\x39\n\x0brequestPath\x18\x04 \x03(\x0b\x32$.seldon.protos.Meta.RequestPathEntry\x12&\n\x07metrics\x18\x05 \x03(\x0b\x32\x15.seldon.protos.Metric\x1a\x43\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a.\n\x0cRoutingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x32\n\x10RequestPathEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xe1\x01\n\x06Metric\x12\x0b\n\x03key\x18\x01 \x01(\t\x12.\n\x04type\x18\x02 \x01(\x0e\x32 .seldon.protos.Metric.MetricType\x12\r\n\x05value\x18\x03 \x01(\x02\x12-\n\x04tags\x18\x04 \x03(\x0b\x32\x1f.seldon.protos.Metric.TagsEntry\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"/\n\nMetricType\x12\x0b\n\x07\x43OUNTER\x10\x00\x12\t\n\x05GAUGE\x10\x01\x12\t\n\x05TIMER\x10\x02"I\n\x11SeldonMessageList\x12\x34\n\x0eseldonMessages\x18\x01 \x03(\x0b\x32\x1c.seldon.protos.SeldonMessage"\x8e\x01\n\x06Status\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0c\n\x04info\x18\x02 \x01(\t\x12\x0e\n\x06reason\x18\x03 \x01(\t\x12\x30\n\x06status\x18\x04 \x01(\x0e\x32 .seldon.protos.Status.StatusFlag"&\n\nStatusFlag\x12\x0b\n\x07SUCCESS\x10\x00\x12\x0b\n\x07\x46\x41ILURE\x10\x01"\xa6\x01\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12-\n\x07request\x18\x01 \x01(\x0b\x32\x1c.seldon.protos.SeldonMessage\x12.\n\x08response\x18\x02 \x01(\x0b\x32\x1c.seldon.protos.SeldonMessage\x12\x0e\n\x06reward\x18\x03 \x01(\x02\x12+\n\x05truth\x18\x04 \x01(\x0b\x32\x1c.seldon.protos.SeldonMessage"p\n\x0fRequestResponse\x12-\n\x07request\x18\x01 \x01(\x0b\x32\x1c.seldon.protos.SeldonMessage\x12.\n\x08response\x18\x02 \x01(\x0b\x32\x1c.seldon.protos.SeldonMessage2\x89\x03\n\x07Generic\x12N\n\x0eTransformInput\x12\x1c.seldon.protos.SeldonMessage\x1a\x1c.seldon.protos.SeldonMessage"\x00\x12O\n\x0fTransformOutput\x12\x1c.seldon.protos.SeldonMessage\x1a\x1c.seldon.protos.SeldonMessage"\x00\x12\x45\n\x05Route\x12\x1c.seldon.protos.SeldonMessage\x1a\x1c.seldon.protos.SeldonMessage"\x00\x12M\n\tAggregate\x12 .seldon.protos.SeldonMessageList\x1a\x1c.seldon.protos.SeldonMessage"\x00\x12G\n\x0cSendFeedback\x12\x17.seldon.protos.Feedback\x1a\x1c.seldon.protos.SeldonMessage"\x00\x32\x99\x01\n\x05Model\x12G\n\x07Predict\x12\x1c.seldon.protos.SeldonMessage\x1a\x1c.seldon.protos.SeldonMessage"\x00\x12G\n\x0cSendFeedback\x12\x17.seldon.protos.Feedback\x1a\x1c.seldon.protos.SeldonMessage"\x00\x32\x98\x01\n\x06Router\x12\x45\n\x05Route\x12\x1c.seldon.protos.SeldonMessage\x1a\x1c.seldon.protos.SeldonMessage"\x00\x12G\n\x0cSendFeedback\x12\x17.seldon.protos.Feedback\x1a\x1c.seldon.protos.SeldonMessage"\x00\x32]\n\x0bTransformer\x12N\n\x0eTransformInput\x12\x1c.seldon.protos.SeldonMessage\x1a\x1c.seldon.protos.SeldonMessage"\x00\x32\x64\n\x11OutputTransformer\x12O\n\x0fTransformOutput\x12\x1c.seldon.protos.SeldonMessage\x1a\x1c.seldon.protos.SeldonMessage"\x00\x32Y\n\x08\x43ombiner\x12M\n\tAggregate\x12 .seldon.protos.SeldonMessageList\x1a\x1c.seldon.protos.SeldonMessage"\x00\x32\x9a\x01\n\x06Seldon\x12G\n\x07Predict\x12\x1c.seldon.protos.SeldonMessage\x1a\x1c.seldon.protos.SeldonMessage"\x00\x12G\n\x0cSendFeedback\x12\x17.seldon.protos.Feedback\x1a\x1c.seldon.protos.SeldonMessage"\x00\x42h\n\x10io.seldon.protosB\x10PredictionProtosZBgithub.com/seldonio/seldon-core/incubating/wrappers/s2i/go/pkg/apib\x06proto3', + dependencies=[ + google_dot_protobuf_dot_any__pb2.DESCRIPTOR, + google_dot_protobuf_dot_struct__pb2.DESCRIPTOR, + tensorflow_dot_core_dot_framework_dot_tensor__pb2.DESCRIPTOR, + ], +) _METRIC_METRICTYPE = _descriptor.EnumDescriptor( - name='MetricType', - full_name='seldon.protos.Metric.MetricType', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='COUNTER', index=0, number=0, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='GAUGE', index=1, number=1, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='TIMER', index=2, number=2, - serialized_options=None, - type=None), - ], - containing_type=None, - serialized_options=None, - serialized_start=1136, - serialized_end=1183, + name="MetricType", + full_name="seldon.protos.Metric.MetricType", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="COUNTER", index=0, number=0, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="GAUGE", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="TIMER", index=2, number=2, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=1207, + serialized_end=1254, ) _sym_db.RegisterEnumDescriptor(_METRIC_METRICTYPE) _STATUS_STATUSFLAG = _descriptor.EnumDescriptor( - name='StatusFlag', - full_name='seldon.protos.Status.StatusFlag', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='SUCCESS', index=0, number=0, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='FAILURE', index=1, number=1, - serialized_options=None, - type=None), - ], - containing_type=None, - serialized_options=None, - serialized_start=1365, - serialized_end=1403, + name="StatusFlag", + full_name="seldon.protos.Status.StatusFlag", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="SUCCESS", index=0, number=0, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="FAILURE", index=1, number=1, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=1436, + serialized_end=1474, ) _sym_db.RegisterEnumDescriptor(_STATUS_STATUSFLAG) _SELDONMESSAGE = _descriptor.Descriptor( - name='SeldonMessage', - full_name='seldon.protos.SeldonMessage', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='status', full_name='seldon.protos.SeldonMessage.status', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='meta', full_name='seldon.protos.SeldonMessage.meta', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='data', full_name='seldon.protos.SeldonMessage.data', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='binData', full_name='seldon.protos.SeldonMessage.binData', index=3, - number=4, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='strData', full_name='seldon.protos.SeldonMessage.strData', index=4, - number=5, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='jsonData', full_name='seldon.protos.SeldonMessage.jsonData', index=5, - number=6, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='data_oneof', full_name='seldon.protos.SeldonMessage.data_oneof', - index=0, containing_type=None, fields=[]), - ], - serialized_start=112, - serialized_end=341, + name="SeldonMessage", + full_name="seldon.protos.SeldonMessage", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="status", + full_name="seldon.protos.SeldonMessage.status", + index=0, + number=1, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="meta", + full_name="seldon.protos.SeldonMessage.meta", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="data", + full_name="seldon.protos.SeldonMessage.data", + index=2, + number=3, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="binData", + full_name="seldon.protos.SeldonMessage.binData", + index=3, + number=4, + type=12, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"", + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="strData", + full_name="seldon.protos.SeldonMessage.strData", + index=4, + number=5, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="jsonData", + full_name="seldon.protos.SeldonMessage.jsonData", + index=5, + number=6, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="customData", + full_name="seldon.protos.SeldonMessage.customData", + index=6, + number=7, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name="data_oneof", + full_name="seldon.protos.SeldonMessage.data_oneof", + index=0, + containing_type=None, + fields=[], + ), + ], + serialized_start=139, + serialized_end=412, ) _DEFAULTDATA = _descriptor.Descriptor( - name='DefaultData', - full_name='seldon.protos.DefaultData', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='names', full_name='seldon.protos.DefaultData.names', index=0, - number=1, type=9, cpp_type=9, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='tensor', full_name='seldon.protos.DefaultData.tensor', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='ndarray', full_name='seldon.protos.DefaultData.ndarray', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='tftensor', full_name='seldon.protos.DefaultData.tftensor', index=3, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='data_oneof', full_name='seldon.protos.DefaultData.data_oneof', - index=0, containing_type=None, fields=[]), - ], - serialized_start=344, - serialized_end=519, + name="DefaultData", + full_name="seldon.protos.DefaultData", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="names", + full_name="seldon.protos.DefaultData.names", + index=0, + number=1, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="tensor", + full_name="seldon.protos.DefaultData.tensor", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="ndarray", + full_name="seldon.protos.DefaultData.ndarray", + index=2, + number=3, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="tftensor", + full_name="seldon.protos.DefaultData.tftensor", + index=3, + number=4, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name="data_oneof", + full_name="seldon.protos.DefaultData.data_oneof", + index=0, + containing_type=None, + fields=[], + ), + ], + serialized_start=415, + serialized_end=590, ) _TENSOR = _descriptor.Descriptor( - name='Tensor', - full_name='seldon.protos.Tensor', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='shape', full_name='seldon.protos.Tensor.shape', index=0, - number=1, type=5, cpp_type=1, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=_b('\020\001'), file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='values', full_name='seldon.protos.Tensor.values', index=1, - number=2, type=1, cpp_type=5, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=_b('\020\001'), file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=521, - serialized_end=568, + name="Tensor", + full_name="seldon.protos.Tensor", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="shape", + full_name="seldon.protos.Tensor.shape", + index=0, + number=1, + type=5, + cpp_type=1, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\020\001", + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="values", + full_name="seldon.protos.Tensor.values", + index=1, + number=2, + type=1, + cpp_type=5, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\020\001", + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=592, + serialized_end=639, ) _META_TAGSENTRY = _descriptor.Descriptor( - name='TagsEntry', - full_name='seldon.protos.Meta.TagsEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='seldon.protos.Meta.TagsEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='seldon.protos.Meta.TagsEntry.value', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=_b('8\001'), - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=788, - serialized_end=855, + name="TagsEntry", + full_name="seldon.protos.Meta.TagsEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="seldon.protos.Meta.TagsEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="seldon.protos.Meta.TagsEntry.value", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=b"8\001", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=859, + serialized_end=926, ) _META_ROUTINGENTRY = _descriptor.Descriptor( - name='RoutingEntry', - full_name='seldon.protos.Meta.RoutingEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='seldon.protos.Meta.RoutingEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='seldon.protos.Meta.RoutingEntry.value', index=1, - number=2, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=_b('8\001'), - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=857, - serialized_end=903, + name="RoutingEntry", + full_name="seldon.protos.Meta.RoutingEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="seldon.protos.Meta.RoutingEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="seldon.protos.Meta.RoutingEntry.value", + index=1, + number=2, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=b"8\001", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=928, + serialized_end=974, ) _META_REQUESTPATHENTRY = _descriptor.Descriptor( - name='RequestPathEntry', - full_name='seldon.protos.Meta.RequestPathEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='seldon.protos.Meta.RequestPathEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='seldon.protos.Meta.RequestPathEntry.value', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=_b('8\001'), - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=905, - serialized_end=955, + name="RequestPathEntry", + full_name="seldon.protos.Meta.RequestPathEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="seldon.protos.Meta.RequestPathEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="seldon.protos.Meta.RequestPathEntry.value", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=b"8\001", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=976, + serialized_end=1026, ) _META = _descriptor.Descriptor( - name='Meta', - full_name='seldon.protos.Meta', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='puid', full_name='seldon.protos.Meta.puid', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='tags', full_name='seldon.protos.Meta.tags', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='routing', full_name='seldon.protos.Meta.routing', index=2, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='requestPath', full_name='seldon.protos.Meta.requestPath', index=3, - number=4, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='metrics', full_name='seldon.protos.Meta.metrics', index=4, - number=5, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[_META_TAGSENTRY, _META_ROUTINGENTRY, _META_REQUESTPATHENTRY, ], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=571, - serialized_end=955, + name="Meta", + full_name="seldon.protos.Meta", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="puid", + full_name="seldon.protos.Meta.puid", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="tags", + full_name="seldon.protos.Meta.tags", + index=1, + number=2, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="routing", + full_name="seldon.protos.Meta.routing", + index=2, + number=3, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="requestPath", + full_name="seldon.protos.Meta.requestPath", + index=3, + number=4, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="metrics", + full_name="seldon.protos.Meta.metrics", + index=4, + number=5, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[_META_TAGSENTRY, _META_ROUTINGENTRY, _META_REQUESTPATHENTRY,], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=642, + serialized_end=1026, ) _METRIC_TAGSENTRY = _descriptor.Descriptor( - name='TagsEntry', - full_name='seldon.protos.Metric.TagsEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='seldon.protos.Metric.TagsEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='seldon.protos.Metric.TagsEntry.value', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=_b('8\001'), - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1091, - serialized_end=1134, + name="TagsEntry", + full_name="seldon.protos.Metric.TagsEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="seldon.protos.Metric.TagsEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="seldon.protos.Metric.TagsEntry.value", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=b"8\001", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1162, + serialized_end=1205, ) _METRIC = _descriptor.Descriptor( - name='Metric', - full_name='seldon.protos.Metric', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='seldon.protos.Metric.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='type', full_name='seldon.protos.Metric.type', index=1, - number=2, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='seldon.protos.Metric.value', index=2, - number=3, type=2, cpp_type=6, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='tags', full_name='seldon.protos.Metric.tags', index=3, - number=4, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[_METRIC_TAGSENTRY, ], - enum_types=[ - _METRIC_METRICTYPE, - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=958, - serialized_end=1183, + name="Metric", + full_name="seldon.protos.Metric", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="seldon.protos.Metric.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="type", + full_name="seldon.protos.Metric.type", + index=1, + number=2, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="seldon.protos.Metric.value", + index=2, + number=3, + type=2, + cpp_type=6, + label=1, + has_default_value=False, + default_value=float(0), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="tags", + full_name="seldon.protos.Metric.tags", + index=3, + number=4, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[_METRIC_TAGSENTRY,], + enum_types=[_METRIC_METRICTYPE,], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1029, + serialized_end=1254, ) _SELDONMESSAGELIST = _descriptor.Descriptor( - name='SeldonMessageList', - full_name='seldon.protos.SeldonMessageList', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='seldonMessages', full_name='seldon.protos.SeldonMessageList.seldonMessages', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1185, - serialized_end=1258, + name="SeldonMessageList", + full_name="seldon.protos.SeldonMessageList", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="seldonMessages", + full_name="seldon.protos.SeldonMessageList.seldonMessages", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1256, + serialized_end=1329, ) _STATUS = _descriptor.Descriptor( - name='Status', - full_name='seldon.protos.Status', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='code', full_name='seldon.protos.Status.code', index=0, - number=1, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='info', full_name='seldon.protos.Status.info', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='reason', full_name='seldon.protos.Status.reason', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='status', full_name='seldon.protos.Status.status', index=3, - number=4, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _STATUS_STATUSFLAG, - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1261, - serialized_end=1403, + name="Status", + full_name="seldon.protos.Status", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="code", + full_name="seldon.protos.Status.code", + index=0, + number=1, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="info", + full_name="seldon.protos.Status.info", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="reason", + full_name="seldon.protos.Status.reason", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="status", + full_name="seldon.protos.Status.status", + index=3, + number=4, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[_STATUS_STATUSFLAG,], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1332, + serialized_end=1474, ) _FEEDBACK = _descriptor.Descriptor( - name='Feedback', - full_name='seldon.protos.Feedback', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='request', full_name='seldon.protos.Feedback.request', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='response', full_name='seldon.protos.Feedback.response', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='reward', full_name='seldon.protos.Feedback.reward', index=2, - number=3, type=2, cpp_type=6, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='truth', full_name='seldon.protos.Feedback.truth', index=3, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1406, - serialized_end=1572, + name="Feedback", + full_name="seldon.protos.Feedback", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="request", + full_name="seldon.protos.Feedback.request", + index=0, + number=1, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="response", + full_name="seldon.protos.Feedback.response", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="reward", + full_name="seldon.protos.Feedback.reward", + index=2, + number=3, + type=2, + cpp_type=6, + label=1, + has_default_value=False, + default_value=float(0), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="truth", + full_name="seldon.protos.Feedback.truth", + index=3, + number=4, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1477, + serialized_end=1643, ) _REQUESTRESPONSE = _descriptor.Descriptor( - name='RequestResponse', - full_name='seldon.protos.RequestResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='request', full_name='seldon.protos.RequestResponse.request', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='response', full_name='seldon.protos.RequestResponse.response', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1574, - serialized_end=1686, + name="RequestResponse", + full_name="seldon.protos.RequestResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="request", + full_name="seldon.protos.RequestResponse.request", + index=0, + number=1, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="response", + full_name="seldon.protos.RequestResponse.response", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1645, + serialized_end=1757, ) -_SELDONMESSAGE.fields_by_name['status'].message_type = _STATUS -_SELDONMESSAGE.fields_by_name['meta'].message_type = _META -_SELDONMESSAGE.fields_by_name['data'].message_type = _DEFAULTDATA -_SELDONMESSAGE.fields_by_name['jsonData'].message_type = google_dot_protobuf_dot_struct__pb2._VALUE -_SELDONMESSAGE.oneofs_by_name['data_oneof'].fields.append( - _SELDONMESSAGE.fields_by_name['data']) -_SELDONMESSAGE.fields_by_name['data'].containing_oneof = _SELDONMESSAGE.oneofs_by_name['data_oneof'] -_SELDONMESSAGE.oneofs_by_name['data_oneof'].fields.append( - _SELDONMESSAGE.fields_by_name['binData']) -_SELDONMESSAGE.fields_by_name['binData'].containing_oneof = _SELDONMESSAGE.oneofs_by_name['data_oneof'] -_SELDONMESSAGE.oneofs_by_name['data_oneof'].fields.append( - _SELDONMESSAGE.fields_by_name['strData']) -_SELDONMESSAGE.fields_by_name['strData'].containing_oneof = _SELDONMESSAGE.oneofs_by_name['data_oneof'] -_SELDONMESSAGE.oneofs_by_name['data_oneof'].fields.append( - _SELDONMESSAGE.fields_by_name['jsonData']) -_SELDONMESSAGE.fields_by_name['jsonData'].containing_oneof = _SELDONMESSAGE.oneofs_by_name['data_oneof'] -_DEFAULTDATA.fields_by_name['tensor'].message_type = _TENSOR -_DEFAULTDATA.fields_by_name['ndarray'].message_type = google_dot_protobuf_dot_struct__pb2._LISTVALUE -_DEFAULTDATA.fields_by_name['tftensor'].message_type = tensorflow_dot_core_dot_framework_dot_tensor__pb2._TENSORPROTO -_DEFAULTDATA.oneofs_by_name['data_oneof'].fields.append( - _DEFAULTDATA.fields_by_name['tensor']) -_DEFAULTDATA.fields_by_name['tensor'].containing_oneof = _DEFAULTDATA.oneofs_by_name['data_oneof'] -_DEFAULTDATA.oneofs_by_name['data_oneof'].fields.append( - _DEFAULTDATA.fields_by_name['ndarray']) -_DEFAULTDATA.fields_by_name['ndarray'].containing_oneof = _DEFAULTDATA.oneofs_by_name['data_oneof'] -_DEFAULTDATA.oneofs_by_name['data_oneof'].fields.append( - _DEFAULTDATA.fields_by_name['tftensor']) -_DEFAULTDATA.fields_by_name['tftensor'].containing_oneof = _DEFAULTDATA.oneofs_by_name['data_oneof'] -_META_TAGSENTRY.fields_by_name['value'].message_type = google_dot_protobuf_dot_struct__pb2._VALUE +_SELDONMESSAGE.fields_by_name["status"].message_type = _STATUS +_SELDONMESSAGE.fields_by_name["meta"].message_type = _META +_SELDONMESSAGE.fields_by_name["data"].message_type = _DEFAULTDATA +_SELDONMESSAGE.fields_by_name[ + "jsonData" +].message_type = google_dot_protobuf_dot_struct__pb2._VALUE +_SELDONMESSAGE.fields_by_name[ + "customData" +].message_type = google_dot_protobuf_dot_any__pb2._ANY +_SELDONMESSAGE.oneofs_by_name["data_oneof"].fields.append( + _SELDONMESSAGE.fields_by_name["data"] +) +_SELDONMESSAGE.fields_by_name["data"].containing_oneof = _SELDONMESSAGE.oneofs_by_name[ + "data_oneof" +] +_SELDONMESSAGE.oneofs_by_name["data_oneof"].fields.append( + _SELDONMESSAGE.fields_by_name["binData"] +) +_SELDONMESSAGE.fields_by_name[ + "binData" +].containing_oneof = _SELDONMESSAGE.oneofs_by_name["data_oneof"] +_SELDONMESSAGE.oneofs_by_name["data_oneof"].fields.append( + _SELDONMESSAGE.fields_by_name["strData"] +) +_SELDONMESSAGE.fields_by_name[ + "strData" +].containing_oneof = _SELDONMESSAGE.oneofs_by_name["data_oneof"] +_SELDONMESSAGE.oneofs_by_name["data_oneof"].fields.append( + _SELDONMESSAGE.fields_by_name["jsonData"] +) +_SELDONMESSAGE.fields_by_name[ + "jsonData" +].containing_oneof = _SELDONMESSAGE.oneofs_by_name["data_oneof"] +_SELDONMESSAGE.oneofs_by_name["data_oneof"].fields.append( + _SELDONMESSAGE.fields_by_name["customData"] +) +_SELDONMESSAGE.fields_by_name[ + "customData" +].containing_oneof = _SELDONMESSAGE.oneofs_by_name["data_oneof"] +_DEFAULTDATA.fields_by_name["tensor"].message_type = _TENSOR +_DEFAULTDATA.fields_by_name[ + "ndarray" +].message_type = google_dot_protobuf_dot_struct__pb2._LISTVALUE +_DEFAULTDATA.fields_by_name[ + "tftensor" +].message_type = tensorflow_dot_core_dot_framework_dot_tensor__pb2._TENSORPROTO +_DEFAULTDATA.oneofs_by_name["data_oneof"].fields.append( + _DEFAULTDATA.fields_by_name["tensor"] +) +_DEFAULTDATA.fields_by_name["tensor"].containing_oneof = _DEFAULTDATA.oneofs_by_name[ + "data_oneof" +] +_DEFAULTDATA.oneofs_by_name["data_oneof"].fields.append( + _DEFAULTDATA.fields_by_name["ndarray"] +) +_DEFAULTDATA.fields_by_name["ndarray"].containing_oneof = _DEFAULTDATA.oneofs_by_name[ + "data_oneof" +] +_DEFAULTDATA.oneofs_by_name["data_oneof"].fields.append( + _DEFAULTDATA.fields_by_name["tftensor"] +) +_DEFAULTDATA.fields_by_name["tftensor"].containing_oneof = _DEFAULTDATA.oneofs_by_name[ + "data_oneof" +] +_META_TAGSENTRY.fields_by_name[ + "value" +].message_type = google_dot_protobuf_dot_struct__pb2._VALUE _META_TAGSENTRY.containing_type = _META _META_ROUTINGENTRY.containing_type = _META _META_REQUESTPATHENTRY.containing_type = _META -_META.fields_by_name['tags'].message_type = _META_TAGSENTRY -_META.fields_by_name['routing'].message_type = _META_ROUTINGENTRY -_META.fields_by_name['requestPath'].message_type = _META_REQUESTPATHENTRY -_META.fields_by_name['metrics'].message_type = _METRIC +_META.fields_by_name["tags"].message_type = _META_TAGSENTRY +_META.fields_by_name["routing"].message_type = _META_ROUTINGENTRY +_META.fields_by_name["requestPath"].message_type = _META_REQUESTPATHENTRY +_META.fields_by_name["metrics"].message_type = _METRIC _METRIC_TAGSENTRY.containing_type = _METRIC -_METRIC.fields_by_name['type'].enum_type = _METRIC_METRICTYPE -_METRIC.fields_by_name['tags'].message_type = _METRIC_TAGSENTRY +_METRIC.fields_by_name["type"].enum_type = _METRIC_METRICTYPE +_METRIC.fields_by_name["tags"].message_type = _METRIC_TAGSENTRY _METRIC_METRICTYPE.containing_type = _METRIC -_SELDONMESSAGELIST.fields_by_name['seldonMessages'].message_type = _SELDONMESSAGE -_STATUS.fields_by_name['status'].enum_type = _STATUS_STATUSFLAG +_SELDONMESSAGELIST.fields_by_name["seldonMessages"].message_type = _SELDONMESSAGE +_STATUS.fields_by_name["status"].enum_type = _STATUS_STATUSFLAG _STATUS_STATUSFLAG.containing_type = _STATUS -_FEEDBACK.fields_by_name['request'].message_type = _SELDONMESSAGE -_FEEDBACK.fields_by_name['response'].message_type = _SELDONMESSAGE -_FEEDBACK.fields_by_name['truth'].message_type = _SELDONMESSAGE -_REQUESTRESPONSE.fields_by_name['request'].message_type = _SELDONMESSAGE -_REQUESTRESPONSE.fields_by_name['response'].message_type = _SELDONMESSAGE -DESCRIPTOR.message_types_by_name['SeldonMessage'] = _SELDONMESSAGE -DESCRIPTOR.message_types_by_name['DefaultData'] = _DEFAULTDATA -DESCRIPTOR.message_types_by_name['Tensor'] = _TENSOR -DESCRIPTOR.message_types_by_name['Meta'] = _META -DESCRIPTOR.message_types_by_name['Metric'] = _METRIC -DESCRIPTOR.message_types_by_name['SeldonMessageList'] = _SELDONMESSAGELIST -DESCRIPTOR.message_types_by_name['Status'] = _STATUS -DESCRIPTOR.message_types_by_name['Feedback'] = _FEEDBACK -DESCRIPTOR.message_types_by_name['RequestResponse'] = _REQUESTRESPONSE +_FEEDBACK.fields_by_name["request"].message_type = _SELDONMESSAGE +_FEEDBACK.fields_by_name["response"].message_type = _SELDONMESSAGE +_FEEDBACK.fields_by_name["truth"].message_type = _SELDONMESSAGE +_REQUESTRESPONSE.fields_by_name["request"].message_type = _SELDONMESSAGE +_REQUESTRESPONSE.fields_by_name["response"].message_type = _SELDONMESSAGE +DESCRIPTOR.message_types_by_name["SeldonMessage"] = _SELDONMESSAGE +DESCRIPTOR.message_types_by_name["DefaultData"] = _DEFAULTDATA +DESCRIPTOR.message_types_by_name["Tensor"] = _TENSOR +DESCRIPTOR.message_types_by_name["Meta"] = _META +DESCRIPTOR.message_types_by_name["Metric"] = _METRIC +DESCRIPTOR.message_types_by_name["SeldonMessageList"] = _SELDONMESSAGELIST +DESCRIPTOR.message_types_by_name["Status"] = _STATUS +DESCRIPTOR.message_types_by_name["Feedback"] = _FEEDBACK +DESCRIPTOR.message_types_by_name["RequestResponse"] = _REQUESTRESPONSE _sym_db.RegisterFileDescriptor(DESCRIPTOR) -SeldonMessage = _reflection.GeneratedProtocolMessageType('SeldonMessage', (_message.Message,), dict( - DESCRIPTOR = _SELDONMESSAGE, - __module__ = 'proto.prediction_pb2' - # @@protoc_insertion_point(class_scope:seldon.protos.SeldonMessage) - )) +SeldonMessage = _reflection.GeneratedProtocolMessageType( + "SeldonMessage", + (_message.Message,), + { + "DESCRIPTOR": _SELDONMESSAGE, + "__module__": "proto.prediction_pb2" + # @@protoc_insertion_point(class_scope:seldon.protos.SeldonMessage) + }, +) _sym_db.RegisterMessage(SeldonMessage) -DefaultData = _reflection.GeneratedProtocolMessageType('DefaultData', (_message.Message,), dict( - DESCRIPTOR = _DEFAULTDATA, - __module__ = 'proto.prediction_pb2' - # @@protoc_insertion_point(class_scope:seldon.protos.DefaultData) - )) +DefaultData = _reflection.GeneratedProtocolMessageType( + "DefaultData", + (_message.Message,), + { + "DESCRIPTOR": _DEFAULTDATA, + "__module__": "proto.prediction_pb2" + # @@protoc_insertion_point(class_scope:seldon.protos.DefaultData) + }, +) _sym_db.RegisterMessage(DefaultData) -Tensor = _reflection.GeneratedProtocolMessageType('Tensor', (_message.Message,), dict( - DESCRIPTOR = _TENSOR, - __module__ = 'proto.prediction_pb2' - # @@protoc_insertion_point(class_scope:seldon.protos.Tensor) - )) +Tensor = _reflection.GeneratedProtocolMessageType( + "Tensor", + (_message.Message,), + { + "DESCRIPTOR": _TENSOR, + "__module__": "proto.prediction_pb2" + # @@protoc_insertion_point(class_scope:seldon.protos.Tensor) + }, +) _sym_db.RegisterMessage(Tensor) -Meta = _reflection.GeneratedProtocolMessageType('Meta', (_message.Message,), dict( - - TagsEntry = _reflection.GeneratedProtocolMessageType('TagsEntry', (_message.Message,), dict( - DESCRIPTOR = _META_TAGSENTRY, - __module__ = 'proto.prediction_pb2' - # @@protoc_insertion_point(class_scope:seldon.protos.Meta.TagsEntry) - )) - , - - RoutingEntry = _reflection.GeneratedProtocolMessageType('RoutingEntry', (_message.Message,), dict( - DESCRIPTOR = _META_ROUTINGENTRY, - __module__ = 'proto.prediction_pb2' - # @@protoc_insertion_point(class_scope:seldon.protos.Meta.RoutingEntry) - )) - , - - RequestPathEntry = _reflection.GeneratedProtocolMessageType('RequestPathEntry', (_message.Message,), dict( - DESCRIPTOR = _META_REQUESTPATHENTRY, - __module__ = 'proto.prediction_pb2' - # @@protoc_insertion_point(class_scope:seldon.protos.Meta.RequestPathEntry) - )) - , - DESCRIPTOR = _META, - __module__ = 'proto.prediction_pb2' - # @@protoc_insertion_point(class_scope:seldon.protos.Meta) - )) +Meta = _reflection.GeneratedProtocolMessageType( + "Meta", + (_message.Message,), + { + "TagsEntry": _reflection.GeneratedProtocolMessageType( + "TagsEntry", + (_message.Message,), + { + "DESCRIPTOR": _META_TAGSENTRY, + "__module__": "proto.prediction_pb2" + # @@protoc_insertion_point(class_scope:seldon.protos.Meta.TagsEntry) + }, + ), + "RoutingEntry": _reflection.GeneratedProtocolMessageType( + "RoutingEntry", + (_message.Message,), + { + "DESCRIPTOR": _META_ROUTINGENTRY, + "__module__": "proto.prediction_pb2" + # @@protoc_insertion_point(class_scope:seldon.protos.Meta.RoutingEntry) + }, + ), + "RequestPathEntry": _reflection.GeneratedProtocolMessageType( + "RequestPathEntry", + (_message.Message,), + { + "DESCRIPTOR": _META_REQUESTPATHENTRY, + "__module__": "proto.prediction_pb2" + # @@protoc_insertion_point(class_scope:seldon.protos.Meta.RequestPathEntry) + }, + ), + "DESCRIPTOR": _META, + "__module__": "proto.prediction_pb2" + # @@protoc_insertion_point(class_scope:seldon.protos.Meta) + }, +) _sym_db.RegisterMessage(Meta) _sym_db.RegisterMessage(Meta.TagsEntry) _sym_db.RegisterMessage(Meta.RoutingEntry) _sym_db.RegisterMessage(Meta.RequestPathEntry) -Metric = _reflection.GeneratedProtocolMessageType('Metric', (_message.Message,), dict( - - TagsEntry = _reflection.GeneratedProtocolMessageType('TagsEntry', (_message.Message,), dict( - DESCRIPTOR = _METRIC_TAGSENTRY, - __module__ = 'proto.prediction_pb2' - # @@protoc_insertion_point(class_scope:seldon.protos.Metric.TagsEntry) - )) - , - DESCRIPTOR = _METRIC, - __module__ = 'proto.prediction_pb2' - # @@protoc_insertion_point(class_scope:seldon.protos.Metric) - )) +Metric = _reflection.GeneratedProtocolMessageType( + "Metric", + (_message.Message,), + { + "TagsEntry": _reflection.GeneratedProtocolMessageType( + "TagsEntry", + (_message.Message,), + { + "DESCRIPTOR": _METRIC_TAGSENTRY, + "__module__": "proto.prediction_pb2" + # @@protoc_insertion_point(class_scope:seldon.protos.Metric.TagsEntry) + }, + ), + "DESCRIPTOR": _METRIC, + "__module__": "proto.prediction_pb2" + # @@protoc_insertion_point(class_scope:seldon.protos.Metric) + }, +) _sym_db.RegisterMessage(Metric) _sym_db.RegisterMessage(Metric.TagsEntry) -SeldonMessageList = _reflection.GeneratedProtocolMessageType('SeldonMessageList', (_message.Message,), dict( - DESCRIPTOR = _SELDONMESSAGELIST, - __module__ = 'proto.prediction_pb2' - # @@protoc_insertion_point(class_scope:seldon.protos.SeldonMessageList) - )) +SeldonMessageList = _reflection.GeneratedProtocolMessageType( + "SeldonMessageList", + (_message.Message,), + { + "DESCRIPTOR": _SELDONMESSAGELIST, + "__module__": "proto.prediction_pb2" + # @@protoc_insertion_point(class_scope:seldon.protos.SeldonMessageList) + }, +) _sym_db.RegisterMessage(SeldonMessageList) -Status = _reflection.GeneratedProtocolMessageType('Status', (_message.Message,), dict( - DESCRIPTOR = _STATUS, - __module__ = 'proto.prediction_pb2' - # @@protoc_insertion_point(class_scope:seldon.protos.Status) - )) +Status = _reflection.GeneratedProtocolMessageType( + "Status", + (_message.Message,), + { + "DESCRIPTOR": _STATUS, + "__module__": "proto.prediction_pb2" + # @@protoc_insertion_point(class_scope:seldon.protos.Status) + }, +) _sym_db.RegisterMessage(Status) -Feedback = _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), dict( - DESCRIPTOR = _FEEDBACK, - __module__ = 'proto.prediction_pb2' - # @@protoc_insertion_point(class_scope:seldon.protos.Feedback) - )) +Feedback = _reflection.GeneratedProtocolMessageType( + "Feedback", + (_message.Message,), + { + "DESCRIPTOR": _FEEDBACK, + "__module__": "proto.prediction_pb2" + # @@protoc_insertion_point(class_scope:seldon.protos.Feedback) + }, +) _sym_db.RegisterMessage(Feedback) -RequestResponse = _reflection.GeneratedProtocolMessageType('RequestResponse', (_message.Message,), dict( - DESCRIPTOR = _REQUESTRESPONSE, - __module__ = 'proto.prediction_pb2' - # @@protoc_insertion_point(class_scope:seldon.protos.RequestResponse) - )) +RequestResponse = _reflection.GeneratedProtocolMessageType( + "RequestResponse", + (_message.Message,), + { + "DESCRIPTOR": _REQUESTRESPONSE, + "__module__": "proto.prediction_pb2" + # @@protoc_insertion_point(class_scope:seldon.protos.RequestResponse) + }, +) _sym_db.RegisterMessage(RequestResponse) DESCRIPTOR._options = None -_TENSOR.fields_by_name['shape']._options = None -_TENSOR.fields_by_name['values']._options = None +_TENSOR.fields_by_name["shape"]._options = None +_TENSOR.fields_by_name["values"]._options = None _META_TAGSENTRY._options = None _META_ROUTINGENTRY._options = None _META_REQUESTPATHENTRY._options = None _METRIC_TAGSENTRY._options = None _GENERIC = _descriptor.ServiceDescriptor( - name='Generic', - full_name='seldon.protos.Generic', - file=DESCRIPTOR, - index=0, - serialized_options=None, - serialized_start=1689, - serialized_end=2082, - methods=[ - _descriptor.MethodDescriptor( - name='TransformInput', - full_name='seldon.protos.Generic.TransformInput', + name="Generic", + full_name="seldon.protos.Generic", + file=DESCRIPTOR, index=0, - containing_service=None, - input_type=_SELDONMESSAGE, - output_type=_SELDONMESSAGE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='TransformOutput', - full_name='seldon.protos.Generic.TransformOutput', - index=1, - containing_service=None, - input_type=_SELDONMESSAGE, - output_type=_SELDONMESSAGE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='Route', - full_name='seldon.protos.Generic.Route', - index=2, - containing_service=None, - input_type=_SELDONMESSAGE, - output_type=_SELDONMESSAGE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='Aggregate', - full_name='seldon.protos.Generic.Aggregate', - index=3, - containing_service=None, - input_type=_SELDONMESSAGELIST, - output_type=_SELDONMESSAGE, serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='SendFeedback', - full_name='seldon.protos.Generic.SendFeedback', - index=4, - containing_service=None, - input_type=_FEEDBACK, - output_type=_SELDONMESSAGE, - serialized_options=None, - ), -]) + serialized_start=1760, + serialized_end=2153, + methods=[ + _descriptor.MethodDescriptor( + name="TransformInput", + full_name="seldon.protos.Generic.TransformInput", + index=0, + containing_service=None, + input_type=_SELDONMESSAGE, + output_type=_SELDONMESSAGE, + serialized_options=None, + ), + _descriptor.MethodDescriptor( + name="TransformOutput", + full_name="seldon.protos.Generic.TransformOutput", + index=1, + containing_service=None, + input_type=_SELDONMESSAGE, + output_type=_SELDONMESSAGE, + serialized_options=None, + ), + _descriptor.MethodDescriptor( + name="Route", + full_name="seldon.protos.Generic.Route", + index=2, + containing_service=None, + input_type=_SELDONMESSAGE, + output_type=_SELDONMESSAGE, + serialized_options=None, + ), + _descriptor.MethodDescriptor( + name="Aggregate", + full_name="seldon.protos.Generic.Aggregate", + index=3, + containing_service=None, + input_type=_SELDONMESSAGELIST, + output_type=_SELDONMESSAGE, + serialized_options=None, + ), + _descriptor.MethodDescriptor( + name="SendFeedback", + full_name="seldon.protos.Generic.SendFeedback", + index=4, + containing_service=None, + input_type=_FEEDBACK, + output_type=_SELDONMESSAGE, + serialized_options=None, + ), + ], +) _sym_db.RegisterServiceDescriptor(_GENERIC) -DESCRIPTOR.services_by_name['Generic'] = _GENERIC +DESCRIPTOR.services_by_name["Generic"] = _GENERIC _MODEL = _descriptor.ServiceDescriptor( - name='Model', - full_name='seldon.protos.Model', - file=DESCRIPTOR, - index=1, - serialized_options=None, - serialized_start=2085, - serialized_end=2238, - methods=[ - _descriptor.MethodDescriptor( - name='Predict', - full_name='seldon.protos.Model.Predict', - index=0, - containing_service=None, - input_type=_SELDONMESSAGE, - output_type=_SELDONMESSAGE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='SendFeedback', - full_name='seldon.protos.Model.SendFeedback', + name="Model", + full_name="seldon.protos.Model", + file=DESCRIPTOR, index=1, - containing_service=None, - input_type=_FEEDBACK, - output_type=_SELDONMESSAGE, serialized_options=None, - ), -]) + serialized_start=2156, + serialized_end=2309, + methods=[ + _descriptor.MethodDescriptor( + name="Predict", + full_name="seldon.protos.Model.Predict", + index=0, + containing_service=None, + input_type=_SELDONMESSAGE, + output_type=_SELDONMESSAGE, + serialized_options=None, + ), + _descriptor.MethodDescriptor( + name="SendFeedback", + full_name="seldon.protos.Model.SendFeedback", + index=1, + containing_service=None, + input_type=_FEEDBACK, + output_type=_SELDONMESSAGE, + serialized_options=None, + ), + ], +) _sym_db.RegisterServiceDescriptor(_MODEL) -DESCRIPTOR.services_by_name['Model'] = _MODEL +DESCRIPTOR.services_by_name["Model"] = _MODEL _ROUTER = _descriptor.ServiceDescriptor( - name='Router', - full_name='seldon.protos.Router', - file=DESCRIPTOR, - index=2, - serialized_options=None, - serialized_start=2241, - serialized_end=2393, - methods=[ - _descriptor.MethodDescriptor( - name='Route', - full_name='seldon.protos.Router.Route', - index=0, - containing_service=None, - input_type=_SELDONMESSAGE, - output_type=_SELDONMESSAGE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='SendFeedback', - full_name='seldon.protos.Router.SendFeedback', - index=1, - containing_service=None, - input_type=_FEEDBACK, - output_type=_SELDONMESSAGE, + name="Router", + full_name="seldon.protos.Router", + file=DESCRIPTOR, + index=2, serialized_options=None, - ), -]) + serialized_start=2312, + serialized_end=2464, + methods=[ + _descriptor.MethodDescriptor( + name="Route", + full_name="seldon.protos.Router.Route", + index=0, + containing_service=None, + input_type=_SELDONMESSAGE, + output_type=_SELDONMESSAGE, + serialized_options=None, + ), + _descriptor.MethodDescriptor( + name="SendFeedback", + full_name="seldon.protos.Router.SendFeedback", + index=1, + containing_service=None, + input_type=_FEEDBACK, + output_type=_SELDONMESSAGE, + serialized_options=None, + ), + ], +) _sym_db.RegisterServiceDescriptor(_ROUTER) -DESCRIPTOR.services_by_name['Router'] = _ROUTER +DESCRIPTOR.services_by_name["Router"] = _ROUTER _TRANSFORMER = _descriptor.ServiceDescriptor( - name='Transformer', - full_name='seldon.protos.Transformer', - file=DESCRIPTOR, - index=3, - serialized_options=None, - serialized_start=2395, - serialized_end=2488, - methods=[ - _descriptor.MethodDescriptor( - name='TransformInput', - full_name='seldon.protos.Transformer.TransformInput', - index=0, - containing_service=None, - input_type=_SELDONMESSAGE, - output_type=_SELDONMESSAGE, + name="Transformer", + full_name="seldon.protos.Transformer", + file=DESCRIPTOR, + index=3, serialized_options=None, - ), -]) + serialized_start=2466, + serialized_end=2559, + methods=[ + _descriptor.MethodDescriptor( + name="TransformInput", + full_name="seldon.protos.Transformer.TransformInput", + index=0, + containing_service=None, + input_type=_SELDONMESSAGE, + output_type=_SELDONMESSAGE, + serialized_options=None, + ), + ], +) _sym_db.RegisterServiceDescriptor(_TRANSFORMER) -DESCRIPTOR.services_by_name['Transformer'] = _TRANSFORMER +DESCRIPTOR.services_by_name["Transformer"] = _TRANSFORMER _OUTPUTTRANSFORMER = _descriptor.ServiceDescriptor( - name='OutputTransformer', - full_name='seldon.protos.OutputTransformer', - file=DESCRIPTOR, - index=4, - serialized_options=None, - serialized_start=2490, - serialized_end=2590, - methods=[ - _descriptor.MethodDescriptor( - name='TransformOutput', - full_name='seldon.protos.OutputTransformer.TransformOutput', - index=0, - containing_service=None, - input_type=_SELDONMESSAGE, - output_type=_SELDONMESSAGE, + name="OutputTransformer", + full_name="seldon.protos.OutputTransformer", + file=DESCRIPTOR, + index=4, serialized_options=None, - ), -]) + serialized_start=2561, + serialized_end=2661, + methods=[ + _descriptor.MethodDescriptor( + name="TransformOutput", + full_name="seldon.protos.OutputTransformer.TransformOutput", + index=0, + containing_service=None, + input_type=_SELDONMESSAGE, + output_type=_SELDONMESSAGE, + serialized_options=None, + ), + ], +) _sym_db.RegisterServiceDescriptor(_OUTPUTTRANSFORMER) -DESCRIPTOR.services_by_name['OutputTransformer'] = _OUTPUTTRANSFORMER +DESCRIPTOR.services_by_name["OutputTransformer"] = _OUTPUTTRANSFORMER _COMBINER = _descriptor.ServiceDescriptor( - name='Combiner', - full_name='seldon.protos.Combiner', - file=DESCRIPTOR, - index=5, - serialized_options=None, - serialized_start=2592, - serialized_end=2681, - methods=[ - _descriptor.MethodDescriptor( - name='Aggregate', - full_name='seldon.protos.Combiner.Aggregate', - index=0, - containing_service=None, - input_type=_SELDONMESSAGELIST, - output_type=_SELDONMESSAGE, + name="Combiner", + full_name="seldon.protos.Combiner", + file=DESCRIPTOR, + index=5, serialized_options=None, - ), -]) + serialized_start=2663, + serialized_end=2752, + methods=[ + _descriptor.MethodDescriptor( + name="Aggregate", + full_name="seldon.protos.Combiner.Aggregate", + index=0, + containing_service=None, + input_type=_SELDONMESSAGELIST, + output_type=_SELDONMESSAGE, + serialized_options=None, + ), + ], +) _sym_db.RegisterServiceDescriptor(_COMBINER) -DESCRIPTOR.services_by_name['Combiner'] = _COMBINER +DESCRIPTOR.services_by_name["Combiner"] = _COMBINER _SELDON = _descriptor.ServiceDescriptor( - name='Seldon', - full_name='seldon.protos.Seldon', - file=DESCRIPTOR, - index=6, - serialized_options=None, - serialized_start=2684, - serialized_end=2838, - methods=[ - _descriptor.MethodDescriptor( - name='Predict', - full_name='seldon.protos.Seldon.Predict', - index=0, - containing_service=None, - input_type=_SELDONMESSAGE, - output_type=_SELDONMESSAGE, + name="Seldon", + full_name="seldon.protos.Seldon", + file=DESCRIPTOR, + index=6, serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='SendFeedback', - full_name='seldon.protos.Seldon.SendFeedback', - index=1, - containing_service=None, - input_type=_FEEDBACK, - output_type=_SELDONMESSAGE, - serialized_options=None, - ), -]) + serialized_start=2755, + serialized_end=2909, + methods=[ + _descriptor.MethodDescriptor( + name="Predict", + full_name="seldon.protos.Seldon.Predict", + index=0, + containing_service=None, + input_type=_SELDONMESSAGE, + output_type=_SELDONMESSAGE, + serialized_options=None, + ), + _descriptor.MethodDescriptor( + name="SendFeedback", + full_name="seldon.protos.Seldon.SendFeedback", + index=1, + containing_service=None, + input_type=_FEEDBACK, + output_type=_SELDONMESSAGE, + serialized_options=None, + ), + ], +) _sym_db.RegisterServiceDescriptor(_SELDON) -DESCRIPTOR.services_by_name['Seldon'] = _SELDON +DESCRIPTOR.services_by_name["Seldon"] = _SELDON # @@protoc_insertion_point(module_scope) diff --git a/python/seldon_core/proto/prediction_pb2.pyi b/python/seldon_core/proto/prediction_pb2.pyi index f58912120a..f04cc0ea24 100644 --- a/python/seldon_core/proto/prediction_pb2.pyi +++ b/python/seldon_core/proto/prediction_pb2.pyi @@ -1,6 +1,11 @@ # @generated by generate_proto_mypy_stubs.py. Do not edit! import sys +from google.protobuf.any_pb2 import ( + Any as google___protobuf___any_pb2___Any, +) + from google.protobuf.descriptor import ( + Descriptor as google___protobuf___descriptor___Descriptor, EnumDescriptor as google___protobuf___descriptor___EnumDescriptor, ) @@ -30,6 +35,7 @@ from typing import ( Optional as typing___Optional, Text as typing___Text, Tuple as typing___Tuple, + Union as typing___Union, cast as typing___cast, ) @@ -38,8 +44,19 @@ from typing_extensions import ( ) +builtin___bool = bool +builtin___bytes = bytes +builtin___float = float +builtin___int = int +builtin___str = str +if sys.version_info < (3,): + builtin___buffer = buffer + builtin___unicode = unicode + + class SeldonMessage(google___protobuf___message___Message): - binData = ... # type: bytes + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + binData = ... # type: builtin___bytes strData = ... # type: typing___Text @property @@ -54,27 +71,33 @@ class SeldonMessage(google___protobuf___message___Message): @property def jsonData(self) -> google___protobuf___struct_pb2___Value: ... + @property + def customData(self) -> google___protobuf___any_pb2___Any: ... + def __init__(self, + *, status : typing___Optional[Status] = None, meta : typing___Optional[Meta] = None, data : typing___Optional[DefaultData] = None, - binData : typing___Optional[bytes] = None, + binData : typing___Optional[builtin___bytes] = None, strData : typing___Optional[typing___Text] = None, jsonData : typing___Optional[google___protobuf___struct_pb2___Value] = None, + customData : typing___Optional[google___protobuf___any_pb2___Any] = None, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> SeldonMessage: ... - def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... - def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... if sys.version_info >= (3,): - def HasField(self, field_name: typing_extensions___Literal[u"binData",u"data",u"data_oneof",u"jsonData",u"meta",u"status",u"strData"]) -> bool: ... - def ClearField(self, field_name: typing_extensions___Literal[u"binData",u"data",u"data_oneof",u"jsonData",u"meta",u"status",u"strData"]) -> None: ... + @classmethod + def FromString(cls, s: builtin___bytes) -> SeldonMessage: ... else: - def HasField(self, field_name: typing_extensions___Literal[u"binData",b"binData",u"data",b"data",u"data_oneof",b"data_oneof",u"jsonData",b"jsonData",u"meta",b"meta",u"status",b"status",u"strData",b"strData"]) -> bool: ... - def ClearField(self, field_name: typing_extensions___Literal[b"binData",b"data",b"data_oneof",b"jsonData",b"meta",b"status",b"strData"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions___Literal[u"data_oneof",b"data_oneof"]) -> typing_extensions___Literal["data","binData","strData","jsonData"]: ... + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> SeldonMessage: ... + def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def HasField(self, field_name: typing_extensions___Literal[u"binData",b"binData",u"customData",b"customData",u"data",b"data",u"data_oneof",b"data_oneof",u"jsonData",b"jsonData",u"meta",b"meta",u"status",b"status",u"strData",b"strData"]) -> builtin___bool: ... + def ClearField(self, field_name: typing_extensions___Literal[u"binData",b"binData",u"customData",b"customData",u"data",b"data",u"data_oneof",b"data_oneof",u"jsonData",b"jsonData",u"meta",b"meta",u"status",b"status",u"strData",b"strData"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions___Literal[u"data_oneof",b"data_oneof"]) -> typing_extensions___Literal["data","binData","strData","jsonData","customData"]: ... class DefaultData(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... names = ... # type: google___protobuf___internal___containers___RepeatedScalarFieldContainer[typing___Text] @property @@ -87,95 +110,108 @@ class DefaultData(google___protobuf___message___Message): def tftensor(self) -> tensorflow___core___framework___tensor_pb2___TensorProto: ... def __init__(self, + *, names : typing___Optional[typing___Iterable[typing___Text]] = None, tensor : typing___Optional[Tensor] = None, ndarray : typing___Optional[google___protobuf___struct_pb2___ListValue] = None, tftensor : typing___Optional[tensorflow___core___framework___tensor_pb2___TensorProto] = None, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> DefaultData: ... - def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... - def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... if sys.version_info >= (3,): - def HasField(self, field_name: typing_extensions___Literal[u"data_oneof",u"ndarray",u"tensor",u"tftensor"]) -> bool: ... - def ClearField(self, field_name: typing_extensions___Literal[u"data_oneof",u"names",u"ndarray",u"tensor",u"tftensor"]) -> None: ... + @classmethod + def FromString(cls, s: builtin___bytes) -> DefaultData: ... else: - def HasField(self, field_name: typing_extensions___Literal[u"data_oneof",b"data_oneof",u"ndarray",b"ndarray",u"tensor",b"tensor",u"tftensor",b"tftensor"]) -> bool: ... - def ClearField(self, field_name: typing_extensions___Literal[b"data_oneof",b"names",b"ndarray",b"tensor",b"tftensor"]) -> None: ... + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> DefaultData: ... + def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def HasField(self, field_name: typing_extensions___Literal[u"data_oneof",b"data_oneof",u"ndarray",b"ndarray",u"tensor",b"tensor",u"tftensor",b"tftensor"]) -> builtin___bool: ... + def ClearField(self, field_name: typing_extensions___Literal[u"data_oneof",b"data_oneof",u"names",b"names",u"ndarray",b"ndarray",u"tensor",b"tensor",u"tftensor",b"tftensor"]) -> None: ... def WhichOneof(self, oneof_group: typing_extensions___Literal[u"data_oneof",b"data_oneof"]) -> typing_extensions___Literal["tensor","ndarray","tftensor"]: ... class Tensor(google___protobuf___message___Message): - shape = ... # type: google___protobuf___internal___containers___RepeatedScalarFieldContainer[int] - values = ... # type: google___protobuf___internal___containers___RepeatedScalarFieldContainer[float] + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + shape = ... # type: google___protobuf___internal___containers___RepeatedScalarFieldContainer[builtin___int] + values = ... # type: google___protobuf___internal___containers___RepeatedScalarFieldContainer[builtin___float] def __init__(self, - shape : typing___Optional[typing___Iterable[int]] = None, - values : typing___Optional[typing___Iterable[float]] = None, + *, + shape : typing___Optional[typing___Iterable[builtin___int]] = None, + values : typing___Optional[typing___Iterable[builtin___float]] = None, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Tensor: ... - def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... - def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... if sys.version_info >= (3,): - def ClearField(self, field_name: typing_extensions___Literal[u"shape",u"values"]) -> None: ... + @classmethod + def FromString(cls, s: builtin___bytes) -> Tensor: ... else: - def ClearField(self, field_name: typing_extensions___Literal[b"shape",b"values"]) -> None: ... + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> Tensor: ... + def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def ClearField(self, field_name: typing_extensions___Literal[u"shape",b"shape",u"values",b"values"]) -> None: ... class Meta(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... class TagsEntry(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... key = ... # type: typing___Text @property def value(self) -> google___protobuf___struct_pb2___Value: ... def __init__(self, + *, key : typing___Optional[typing___Text] = None, value : typing___Optional[google___protobuf___struct_pb2___Value] = None, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Meta.TagsEntry: ... - def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... - def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... if sys.version_info >= (3,): - def HasField(self, field_name: typing_extensions___Literal[u"value"]) -> bool: ... - def ClearField(self, field_name: typing_extensions___Literal[u"key",u"value"]) -> None: ... + @classmethod + def FromString(cls, s: builtin___bytes) -> Meta.TagsEntry: ... else: - def HasField(self, field_name: typing_extensions___Literal[u"value",b"value"]) -> bool: ... - def ClearField(self, field_name: typing_extensions___Literal[b"key",b"value"]) -> None: ... + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> Meta.TagsEntry: ... + def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def HasField(self, field_name: typing_extensions___Literal[u"value",b"value"]) -> builtin___bool: ... + def ClearField(self, field_name: typing_extensions___Literal[u"key",b"key",u"value",b"value"]) -> None: ... class RoutingEntry(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... key = ... # type: typing___Text - value = ... # type: int + value = ... # type: builtin___int def __init__(self, + *, key : typing___Optional[typing___Text] = None, - value : typing___Optional[int] = None, + value : typing___Optional[builtin___int] = None, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Meta.RoutingEntry: ... - def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... - def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... if sys.version_info >= (3,): - def ClearField(self, field_name: typing_extensions___Literal[u"key",u"value"]) -> None: ... + @classmethod + def FromString(cls, s: builtin___bytes) -> Meta.RoutingEntry: ... else: - def ClearField(self, field_name: typing_extensions___Literal[b"key",b"value"]) -> None: ... + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> Meta.RoutingEntry: ... + def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def ClearField(self, field_name: typing_extensions___Literal[u"key",b"key",u"value",b"value"]) -> None: ... class RequestPathEntry(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... key = ... # type: typing___Text value = ... # type: typing___Text def __init__(self, + *, key : typing___Optional[typing___Text] = None, value : typing___Optional[typing___Text] = None, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Meta.RequestPathEntry: ... - def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... - def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... if sys.version_info >= (3,): - def ClearField(self, field_name: typing_extensions___Literal[u"key",u"value"]) -> None: ... + @classmethod + def FromString(cls, s: builtin___bytes) -> Meta.RequestPathEntry: ... else: - def ClearField(self, field_name: typing_extensions___Literal[b"key",b"value"]) -> None: ... + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> Meta.RequestPathEntry: ... + def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def ClearField(self, field_name: typing_extensions___Literal[u"key",b"key",u"value",b"value"]) -> None: ... puid = ... # type: typing___Text @@ -183,7 +219,7 @@ class Meta(google___protobuf___message___Message): def tags(self) -> typing___MutableMapping[typing___Text, google___protobuf___struct_pb2___Value]: ... @property - def routing(self) -> typing___MutableMapping[typing___Text, int]: ... + def routing(self) -> typing___MutableMapping[typing___Text, builtin___int]: ... @property def requestPath(self) -> typing___MutableMapping[typing___Text, typing___Text]: ... @@ -192,132 +228,152 @@ class Meta(google___protobuf___message___Message): def metrics(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[Metric]: ... def __init__(self, + *, puid : typing___Optional[typing___Text] = None, tags : typing___Optional[typing___Mapping[typing___Text, google___protobuf___struct_pb2___Value]] = None, - routing : typing___Optional[typing___Mapping[typing___Text, int]] = None, + routing : typing___Optional[typing___Mapping[typing___Text, builtin___int]] = None, requestPath : typing___Optional[typing___Mapping[typing___Text, typing___Text]] = None, metrics : typing___Optional[typing___Iterable[Metric]] = None, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Meta: ... - def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... - def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... if sys.version_info >= (3,): - def ClearField(self, field_name: typing_extensions___Literal[u"metrics",u"puid",u"requestPath",u"routing",u"tags"]) -> None: ... + @classmethod + def FromString(cls, s: builtin___bytes) -> Meta: ... else: - def ClearField(self, field_name: typing_extensions___Literal[b"metrics",b"puid",b"requestPath",b"routing",b"tags"]) -> None: ... + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> Meta: ... + def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def ClearField(self, field_name: typing_extensions___Literal[u"metrics",b"metrics",u"puid",b"puid",u"requestPath",b"requestPath",u"routing",b"routing",u"tags",b"tags"]) -> None: ... class Metric(google___protobuf___message___Message): - class MetricType(int): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + class MetricType(builtin___int): DESCRIPTOR: google___protobuf___descriptor___EnumDescriptor = ... @classmethod - def Name(cls, number: int) -> str: ... + def Name(cls, number: builtin___int) -> builtin___str: ... @classmethod - def Value(cls, name: str) -> Metric.MetricType: ... + def Value(cls, name: builtin___str) -> 'Metric.MetricType': ... @classmethod - def keys(cls) -> typing___List[str]: ... + def keys(cls) -> typing___List[builtin___str]: ... @classmethod - def values(cls) -> typing___List[Metric.MetricType]: ... + def values(cls) -> typing___List['Metric.MetricType']: ... @classmethod - def items(cls) -> typing___List[typing___Tuple[str, Metric.MetricType]]: ... - COUNTER = typing___cast(MetricType, 0) - GAUGE = typing___cast(MetricType, 1) - TIMER = typing___cast(MetricType, 2) + def items(cls) -> typing___List[typing___Tuple[builtin___str, 'Metric.MetricType']]: ... + COUNTER = typing___cast('Metric.MetricType', 0) + GAUGE = typing___cast('Metric.MetricType', 1) + TIMER = typing___cast('Metric.MetricType', 2) + COUNTER = typing___cast('Metric.MetricType', 0) + GAUGE = typing___cast('Metric.MetricType', 1) + TIMER = typing___cast('Metric.MetricType', 2) class TagsEntry(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... key = ... # type: typing___Text value = ... # type: typing___Text def __init__(self, + *, key : typing___Optional[typing___Text] = None, value : typing___Optional[typing___Text] = None, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Metric.TagsEntry: ... - def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... - def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... if sys.version_info >= (3,): - def ClearField(self, field_name: typing_extensions___Literal[u"key",u"value"]) -> None: ... + @classmethod + def FromString(cls, s: builtin___bytes) -> Metric.TagsEntry: ... else: - def ClearField(self, field_name: typing_extensions___Literal[b"key",b"value"]) -> None: ... + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> Metric.TagsEntry: ... + def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def ClearField(self, field_name: typing_extensions___Literal[u"key",b"key",u"value",b"value"]) -> None: ... key = ... # type: typing___Text type = ... # type: Metric.MetricType - value = ... # type: float + value = ... # type: builtin___float @property def tags(self) -> typing___MutableMapping[typing___Text, typing___Text]: ... def __init__(self, + *, key : typing___Optional[typing___Text] = None, type : typing___Optional[Metric.MetricType] = None, - value : typing___Optional[float] = None, + value : typing___Optional[builtin___float] = None, tags : typing___Optional[typing___Mapping[typing___Text, typing___Text]] = None, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Metric: ... - def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... - def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... if sys.version_info >= (3,): - def ClearField(self, field_name: typing_extensions___Literal[u"key",u"tags",u"type",u"value"]) -> None: ... + @classmethod + def FromString(cls, s: builtin___bytes) -> Metric: ... else: - def ClearField(self, field_name: typing_extensions___Literal[b"key",b"tags",b"type",b"value"]) -> None: ... + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> Metric: ... + def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def ClearField(self, field_name: typing_extensions___Literal[u"key",b"key",u"tags",b"tags",u"type",b"type",u"value",b"value"]) -> None: ... class SeldonMessageList(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... @property def seldonMessages(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[SeldonMessage]: ... def __init__(self, + *, seldonMessages : typing___Optional[typing___Iterable[SeldonMessage]] = None, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> SeldonMessageList: ... - def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... - def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... if sys.version_info >= (3,): - def ClearField(self, field_name: typing_extensions___Literal[u"seldonMessages"]) -> None: ... + @classmethod + def FromString(cls, s: builtin___bytes) -> SeldonMessageList: ... else: - def ClearField(self, field_name: typing_extensions___Literal[b"seldonMessages"]) -> None: ... + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> SeldonMessageList: ... + def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def ClearField(self, field_name: typing_extensions___Literal[u"seldonMessages",b"seldonMessages"]) -> None: ... class Status(google___protobuf___message___Message): - class StatusFlag(int): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + class StatusFlag(builtin___int): DESCRIPTOR: google___protobuf___descriptor___EnumDescriptor = ... @classmethod - def Name(cls, number: int) -> str: ... + def Name(cls, number: builtin___int) -> builtin___str: ... @classmethod - def Value(cls, name: str) -> Status.StatusFlag: ... + def Value(cls, name: builtin___str) -> 'Status.StatusFlag': ... @classmethod - def keys(cls) -> typing___List[str]: ... + def keys(cls) -> typing___List[builtin___str]: ... @classmethod - def values(cls) -> typing___List[Status.StatusFlag]: ... + def values(cls) -> typing___List['Status.StatusFlag']: ... @classmethod - def items(cls) -> typing___List[typing___Tuple[str, Status.StatusFlag]]: ... - SUCCESS = typing___cast(StatusFlag, 0) - FAILURE = typing___cast(StatusFlag, 1) + def items(cls) -> typing___List[typing___Tuple[builtin___str, 'Status.StatusFlag']]: ... + SUCCESS = typing___cast('Status.StatusFlag', 0) + FAILURE = typing___cast('Status.StatusFlag', 1) + SUCCESS = typing___cast('Status.StatusFlag', 0) + FAILURE = typing___cast('Status.StatusFlag', 1) - code = ... # type: int + code = ... # type: builtin___int info = ... # type: typing___Text reason = ... # type: typing___Text status = ... # type: Status.StatusFlag def __init__(self, - code : typing___Optional[int] = None, + *, + code : typing___Optional[builtin___int] = None, info : typing___Optional[typing___Text] = None, reason : typing___Optional[typing___Text] = None, status : typing___Optional[Status.StatusFlag] = None, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Status: ... - def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... - def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... if sys.version_info >= (3,): - def ClearField(self, field_name: typing_extensions___Literal[u"code",u"info",u"reason",u"status"]) -> None: ... + @classmethod + def FromString(cls, s: builtin___bytes) -> Status: ... else: - def ClearField(self, field_name: typing_extensions___Literal[b"code",b"info",b"reason",b"status"]) -> None: ... + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> Status: ... + def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def ClearField(self, field_name: typing_extensions___Literal[u"code",b"code",u"info",b"info",u"reason",b"reason",u"status",b"status"]) -> None: ... class Feedback(google___protobuf___message___Message): - reward = ... # type: float + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... + reward = ... # type: builtin___float @property def request(self) -> SeldonMessage: ... @@ -329,23 +385,25 @@ class Feedback(google___protobuf___message___Message): def truth(self) -> SeldonMessage: ... def __init__(self, + *, request : typing___Optional[SeldonMessage] = None, response : typing___Optional[SeldonMessage] = None, - reward : typing___Optional[float] = None, + reward : typing___Optional[builtin___float] = None, truth : typing___Optional[SeldonMessage] = None, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Feedback: ... - def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... - def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... if sys.version_info >= (3,): - def HasField(self, field_name: typing_extensions___Literal[u"request",u"response",u"truth"]) -> bool: ... - def ClearField(self, field_name: typing_extensions___Literal[u"request",u"response",u"reward",u"truth"]) -> None: ... + @classmethod + def FromString(cls, s: builtin___bytes) -> Feedback: ... else: - def HasField(self, field_name: typing_extensions___Literal[u"request",b"request",u"response",b"response",u"truth",b"truth"]) -> bool: ... - def ClearField(self, field_name: typing_extensions___Literal[b"request",b"response",b"reward",b"truth"]) -> None: ... + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> Feedback: ... + def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def HasField(self, field_name: typing_extensions___Literal[u"request",b"request",u"response",b"response",u"truth",b"truth"]) -> builtin___bool: ... + def ClearField(self, field_name: typing_extensions___Literal[u"request",b"request",u"response",b"response",u"reward",b"reward",u"truth",b"truth"]) -> None: ... class RequestResponse(google___protobuf___message___Message): + DESCRIPTOR: google___protobuf___descriptor___Descriptor = ... @property def request(self) -> SeldonMessage: ... @@ -354,16 +412,17 @@ class RequestResponse(google___protobuf___message___Message): def response(self) -> SeldonMessage: ... def __init__(self, + *, request : typing___Optional[SeldonMessage] = None, response : typing___Optional[SeldonMessage] = None, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> RequestResponse: ... - def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... - def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... if sys.version_info >= (3,): - def HasField(self, field_name: typing_extensions___Literal[u"request",u"response"]) -> bool: ... - def ClearField(self, field_name: typing_extensions___Literal[u"request",u"response"]) -> None: ... + @classmethod + def FromString(cls, s: builtin___bytes) -> RequestResponse: ... else: - def HasField(self, field_name: typing_extensions___Literal[u"request",b"request",u"response",b"response"]) -> bool: ... - def ClearField(self, field_name: typing_extensions___Literal[b"request",b"response"]) -> None: ... + @classmethod + def FromString(cls, s: typing___Union[builtin___bytes, builtin___buffer, builtin___unicode]) -> RequestResponse: ... + def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ... + def HasField(self, field_name: typing_extensions___Literal[u"request",b"request",u"response",b"response"]) -> builtin___bool: ... + def ClearField(self, field_name: typing_extensions___Literal[u"request",b"request",u"response",b"response"]) -> None: ... diff --git a/python/seldon_core/proto/tensorflow/core/framework/resource_handle_pb2.py b/python/seldon_core/proto/tensorflow/core/framework/resource_handle_pb2.py index f6405e81e5..4839f19e86 100644 --- a/python/seldon_core/proto/tensorflow/core/framework/resource_handle_pb2.py +++ b/python/seldon_core/proto/tensorflow/core/framework/resource_handle_pb2.py @@ -2,161 +2,270 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: tensorflow/core/framework/resource_handle.proto -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from . import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2 +from . import ( + tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2, +) from . import types_pb2 as tensorflow_dot_core_dot_framework_dot_types__pb2 DESCRIPTOR = _descriptor.FileDescriptor( - name='tensorflow/core/framework/resource_handle.proto', - package='tensorflow', - syntax='proto3', - serialized_options=_b('\n\030org.tensorflow.frameworkB\016ResourceHandleP\001ZVgithub.com/tensorflow/tensorflow/tensorflow/go/core/framework/resource_handle_go_proto\370\001\001'), - serialized_pb=_b('\n/tensorflow/core/framework/resource_handle.proto\x12\ntensorflow\x1a,tensorflow/core/framework/tensor_shape.proto\x1a%tensorflow/core/framework/types.proto\"\xb8\x02\n\x13ResourceHandleProto\x12\x0e\n\x06\x64\x65vice\x18\x01 \x01(\t\x12\x11\n\tcontainer\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x11\n\thash_code\x18\x04 \x01(\x04\x12\x17\n\x0fmaybe_type_name\x18\x05 \x01(\t\x12H\n\x11\x64types_and_shapes\x18\x06 \x03(\x0b\x32-.tensorflow.ResourceHandleProto.DtypeAndShape\x12\x17\n\x0f\x61llowed_devices\x18\x07 \x03(\t\x1a\x61\n\rDtypeAndShape\x12#\n\x05\x64type\x18\x01 \x01(\x0e\x32\x14.tensorflow.DataType\x12+\n\x05shape\x18\x02 \x01(\x0b\x32\x1c.tensorflow.TensorShapeProtoB\x87\x01\n\x18org.tensorflow.frameworkB\x0eResourceHandleP\x01ZVgithub.com/tensorflow/tensorflow/tensorflow/go/core/framework/resource_handle_go_proto\xf8\x01\x01\x62\x06proto3') - , - dependencies=[tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2.DESCRIPTOR,tensorflow_dot_core_dot_framework_dot_types__pb2.DESCRIPTOR,]) - - + name="tensorflow/core/framework/resource_handle.proto", + package="tensorflow", + syntax="proto3", + serialized_options=b"\n\030org.tensorflow.frameworkB\016ResourceHandleP\001ZVgithub.com/tensorflow/tensorflow/tensorflow/go/core/framework/resource_handle_go_proto\370\001\001", + serialized_pb=b'\n/tensorflow/core/framework/resource_handle.proto\x12\ntensorflow\x1a,tensorflow/core/framework/tensor_shape.proto\x1a%tensorflow/core/framework/types.proto"\xb8\x02\n\x13ResourceHandleProto\x12\x0e\n\x06\x64\x65vice\x18\x01 \x01(\t\x12\x11\n\tcontainer\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x11\n\thash_code\x18\x04 \x01(\x04\x12\x17\n\x0fmaybe_type_name\x18\x05 \x01(\t\x12H\n\x11\x64types_and_shapes\x18\x06 \x03(\x0b\x32-.tensorflow.ResourceHandleProto.DtypeAndShape\x12\x17\n\x0f\x61llowed_devices\x18\x07 \x03(\t\x1a\x61\n\rDtypeAndShape\x12#\n\x05\x64type\x18\x01 \x01(\x0e\x32\x14.tensorflow.DataType\x12+\n\x05shape\x18\x02 \x01(\x0b\x32\x1c.tensorflow.TensorShapeProtoB\x87\x01\n\x18org.tensorflow.frameworkB\x0eResourceHandleP\x01ZVgithub.com/tensorflow/tensorflow/tensorflow/go/core/framework/resource_handle_go_proto\xf8\x01\x01\x62\x06proto3', + dependencies=[ + tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2.DESCRIPTOR, + tensorflow_dot_core_dot_framework_dot_types__pb2.DESCRIPTOR, + ], +) _RESOURCEHANDLEPROTO_DTYPEANDSHAPE = _descriptor.Descriptor( - name='DtypeAndShape', - full_name='tensorflow.ResourceHandleProto.DtypeAndShape', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='dtype', full_name='tensorflow.ResourceHandleProto.DtypeAndShape.dtype', index=0, - number=1, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='shape', full_name='tensorflow.ResourceHandleProto.DtypeAndShape.shape', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=364, - serialized_end=461, + name="DtypeAndShape", + full_name="tensorflow.ResourceHandleProto.DtypeAndShape", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="dtype", + full_name="tensorflow.ResourceHandleProto.DtypeAndShape.dtype", + index=0, + number=1, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="shape", + full_name="tensorflow.ResourceHandleProto.DtypeAndShape.shape", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=364, + serialized_end=461, ) _RESOURCEHANDLEPROTO = _descriptor.Descriptor( - name='ResourceHandleProto', - full_name='tensorflow.ResourceHandleProto', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='device', full_name='tensorflow.ResourceHandleProto.device', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='container', full_name='tensorflow.ResourceHandleProto.container', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='name', full_name='tensorflow.ResourceHandleProto.name', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='hash_code', full_name='tensorflow.ResourceHandleProto.hash_code', index=3, - number=4, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='maybe_type_name', full_name='tensorflow.ResourceHandleProto.maybe_type_name', index=4, - number=5, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='dtypes_and_shapes', full_name='tensorflow.ResourceHandleProto.dtypes_and_shapes', index=5, - number=6, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='allowed_devices', full_name='tensorflow.ResourceHandleProto.allowed_devices', index=6, - number=7, type=9, cpp_type=9, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[_RESOURCEHANDLEPROTO_DTYPEANDSHAPE, ], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=149, - serialized_end=461, + name="ResourceHandleProto", + full_name="tensorflow.ResourceHandleProto", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="device", + full_name="tensorflow.ResourceHandleProto.device", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="container", + full_name="tensorflow.ResourceHandleProto.container", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="name", + full_name="tensorflow.ResourceHandleProto.name", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="hash_code", + full_name="tensorflow.ResourceHandleProto.hash_code", + index=3, + number=4, + type=4, + cpp_type=4, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="maybe_type_name", + full_name="tensorflow.ResourceHandleProto.maybe_type_name", + index=4, + number=5, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="dtypes_and_shapes", + full_name="tensorflow.ResourceHandleProto.dtypes_and_shapes", + index=5, + number=6, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="allowed_devices", + full_name="tensorflow.ResourceHandleProto.allowed_devices", + index=6, + number=7, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[_RESOURCEHANDLEPROTO_DTYPEANDSHAPE,], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=149, + serialized_end=461, ) -_RESOURCEHANDLEPROTO_DTYPEANDSHAPE.fields_by_name['dtype'].enum_type = tensorflow_dot_core_dot_framework_dot_types__pb2._DATATYPE -_RESOURCEHANDLEPROTO_DTYPEANDSHAPE.fields_by_name['shape'].message_type = tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2._TENSORSHAPEPROTO +_RESOURCEHANDLEPROTO_DTYPEANDSHAPE.fields_by_name[ + "dtype" +].enum_type = tensorflow_dot_core_dot_framework_dot_types__pb2._DATATYPE +_RESOURCEHANDLEPROTO_DTYPEANDSHAPE.fields_by_name[ + "shape" +].message_type = ( + tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2._TENSORSHAPEPROTO +) _RESOURCEHANDLEPROTO_DTYPEANDSHAPE.containing_type = _RESOURCEHANDLEPROTO -_RESOURCEHANDLEPROTO.fields_by_name['dtypes_and_shapes'].message_type = _RESOURCEHANDLEPROTO_DTYPEANDSHAPE -DESCRIPTOR.message_types_by_name['ResourceHandleProto'] = _RESOURCEHANDLEPROTO +_RESOURCEHANDLEPROTO.fields_by_name[ + "dtypes_and_shapes" +].message_type = _RESOURCEHANDLEPROTO_DTYPEANDSHAPE +DESCRIPTOR.message_types_by_name["ResourceHandleProto"] = _RESOURCEHANDLEPROTO _sym_db.RegisterFileDescriptor(DESCRIPTOR) -ResourceHandleProto = _reflection.GeneratedProtocolMessageType('ResourceHandleProto', (_message.Message,), dict( - - DtypeAndShape = _reflection.GeneratedProtocolMessageType('DtypeAndShape', (_message.Message,), dict( - DESCRIPTOR = _RESOURCEHANDLEPROTO_DTYPEANDSHAPE, - __module__ = 'tensorflow.core.framework.resource_handle_pb2' - # @@protoc_insertion_point(class_scope:tensorflow.ResourceHandleProto.DtypeAndShape) - )) - , - DESCRIPTOR = _RESOURCEHANDLEPROTO, - __module__ = 'tensorflow.core.framework.resource_handle_pb2' - # @@protoc_insertion_point(class_scope:tensorflow.ResourceHandleProto) - )) +ResourceHandleProto = _reflection.GeneratedProtocolMessageType( + "ResourceHandleProto", + (_message.Message,), + { + "DtypeAndShape": _reflection.GeneratedProtocolMessageType( + "DtypeAndShape", + (_message.Message,), + { + "DESCRIPTOR": _RESOURCEHANDLEPROTO_DTYPEANDSHAPE, + "__module__": "tensorflow.core.framework.resource_handle_pb2" + # @@protoc_insertion_point(class_scope:tensorflow.ResourceHandleProto.DtypeAndShape) + }, + ), + "DESCRIPTOR": _RESOURCEHANDLEPROTO, + "__module__": "tensorflow.core.framework.resource_handle_pb2" + # @@protoc_insertion_point(class_scope:tensorflow.ResourceHandleProto) + }, +) _sym_db.RegisterMessage(ResourceHandleProto) _sym_db.RegisterMessage(ResourceHandleProto.DtypeAndShape) diff --git a/python/seldon_core/proto/tensorflow/core/framework/tensor_pb2.py b/python/seldon_core/proto/tensorflow/core/framework/tensor_pb2.py index 4aed221c88..6fe200a479 100644 --- a/python/seldon_core/proto/tensorflow/core/framework/tensor_pb2.py +++ b/python/seldon_core/proto/tensorflow/core/framework/tensor_pb2.py @@ -2,254 +2,491 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: tensorflow/core/framework/tensor.proto -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from . import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resource__handle__pb2 -from . import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2 +from . import ( + resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resource__handle__pb2, +) +from . import ( + tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2, +) from . import types_pb2 as tensorflow_dot_core_dot_framework_dot_types__pb2 DESCRIPTOR = _descriptor.FileDescriptor( - name='tensorflow/core/framework/tensor.proto', - package='tensorflow', - syntax='proto3', - serialized_options=_b('\n\030org.tensorflow.frameworkB\014TensorProtosP\001ZMgithub.com/tensorflow/tensorflow/tensorflow/go/core/framework/tensor_go_proto\370\001\001'), - serialized_pb=_b('\n&tensorflow/core/framework/tensor.proto\x12\ntensorflow\x1a/tensorflow/core/framework/resource_handle.proto\x1a,tensorflow/core/framework/tensor_shape.proto\x1a%tensorflow/core/framework/types.proto\"\x8c\x04\n\x0bTensorProto\x12#\n\x05\x64type\x18\x01 \x01(\x0e\x32\x14.tensorflow.DataType\x12\x32\n\x0ctensor_shape\x18\x02 \x01(\x0b\x32\x1c.tensorflow.TensorShapeProto\x12\x16\n\x0eversion_number\x18\x03 \x01(\x05\x12\x16\n\x0etensor_content\x18\x04 \x01(\x0c\x12\x14\n\x08half_val\x18\r \x03(\x05\x42\x02\x10\x01\x12\x15\n\tfloat_val\x18\x05 \x03(\x02\x42\x02\x10\x01\x12\x16\n\ndouble_val\x18\x06 \x03(\x01\x42\x02\x10\x01\x12\x13\n\x07int_val\x18\x07 \x03(\x05\x42\x02\x10\x01\x12\x12\n\nstring_val\x18\x08 \x03(\x0c\x12\x18\n\x0cscomplex_val\x18\t \x03(\x02\x42\x02\x10\x01\x12\x15\n\tint64_val\x18\n \x03(\x03\x42\x02\x10\x01\x12\x14\n\x08\x62ool_val\x18\x0b \x03(\x08\x42\x02\x10\x01\x12\x18\n\x0c\x64\x63omplex_val\x18\x0c \x03(\x01\x42\x02\x10\x01\x12<\n\x13resource_handle_val\x18\x0e \x03(\x0b\x32\x1f.tensorflow.ResourceHandleProto\x12\x37\n\x0bvariant_val\x18\x0f \x03(\x0b\x32\".tensorflow.VariantTensorDataProto\x12\x16\n\nuint32_val\x18\x10 \x03(\rB\x02\x10\x01\x12\x16\n\nuint64_val\x18\x11 \x03(\x04\x42\x02\x10\x01\"g\n\x16VariantTensorDataProto\x12\x11\n\ttype_name\x18\x01 \x01(\t\x12\x10\n\x08metadata\x18\x02 \x01(\x0c\x12(\n\x07tensors\x18\x03 \x03(\x0b\x32\x17.tensorflow.TensorProtoB|\n\x18org.tensorflow.frameworkB\x0cTensorProtosP\x01ZMgithub.com/tensorflow/tensorflow/tensorflow/go/core/framework/tensor_go_proto\xf8\x01\x01\x62\x06proto3') - , - dependencies=[tensorflow_dot_core_dot_framework_dot_resource__handle__pb2.DESCRIPTOR,tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2.DESCRIPTOR,tensorflow_dot_core_dot_framework_dot_types__pb2.DESCRIPTOR,]) - - + name="tensorflow/core/framework/tensor.proto", + package="tensorflow", + syntax="proto3", + serialized_options=b"\n\030org.tensorflow.frameworkB\014TensorProtosP\001ZMgithub.com/tensorflow/tensorflow/tensorflow/go/core/framework/tensor_go_proto\370\001\001", + serialized_pb=b'\n&tensorflow/core/framework/tensor.proto\x12\ntensorflow\x1a/tensorflow/core/framework/resource_handle.proto\x1a,tensorflow/core/framework/tensor_shape.proto\x1a%tensorflow/core/framework/types.proto"\x8c\x04\n\x0bTensorProto\x12#\n\x05\x64type\x18\x01 \x01(\x0e\x32\x14.tensorflow.DataType\x12\x32\n\x0ctensor_shape\x18\x02 \x01(\x0b\x32\x1c.tensorflow.TensorShapeProto\x12\x16\n\x0eversion_number\x18\x03 \x01(\x05\x12\x16\n\x0etensor_content\x18\x04 \x01(\x0c\x12\x14\n\x08half_val\x18\r \x03(\x05\x42\x02\x10\x01\x12\x15\n\tfloat_val\x18\x05 \x03(\x02\x42\x02\x10\x01\x12\x16\n\ndouble_val\x18\x06 \x03(\x01\x42\x02\x10\x01\x12\x13\n\x07int_val\x18\x07 \x03(\x05\x42\x02\x10\x01\x12\x12\n\nstring_val\x18\x08 \x03(\x0c\x12\x18\n\x0cscomplex_val\x18\t \x03(\x02\x42\x02\x10\x01\x12\x15\n\tint64_val\x18\n \x03(\x03\x42\x02\x10\x01\x12\x14\n\x08\x62ool_val\x18\x0b \x03(\x08\x42\x02\x10\x01\x12\x18\n\x0c\x64\x63omplex_val\x18\x0c \x03(\x01\x42\x02\x10\x01\x12<\n\x13resource_handle_val\x18\x0e \x03(\x0b\x32\x1f.tensorflow.ResourceHandleProto\x12\x37\n\x0bvariant_val\x18\x0f \x03(\x0b\x32".tensorflow.VariantTensorDataProto\x12\x16\n\nuint32_val\x18\x10 \x03(\rB\x02\x10\x01\x12\x16\n\nuint64_val\x18\x11 \x03(\x04\x42\x02\x10\x01"g\n\x16VariantTensorDataProto\x12\x11\n\ttype_name\x18\x01 \x01(\t\x12\x10\n\x08metadata\x18\x02 \x01(\x0c\x12(\n\x07tensors\x18\x03 \x03(\x0b\x32\x17.tensorflow.TensorProtoB|\n\x18org.tensorflow.frameworkB\x0cTensorProtosP\x01ZMgithub.com/tensorflow/tensorflow/tensorflow/go/core/framework/tensor_go_proto\xf8\x01\x01\x62\x06proto3', + dependencies=[ + tensorflow_dot_core_dot_framework_dot_resource__handle__pb2.DESCRIPTOR, + tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2.DESCRIPTOR, + tensorflow_dot_core_dot_framework_dot_types__pb2.DESCRIPTOR, + ], +) _TENSORPROTO = _descriptor.Descriptor( - name='TensorProto', - full_name='tensorflow.TensorProto', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='dtype', full_name='tensorflow.TensorProto.dtype', index=0, - number=1, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='tensor_shape', full_name='tensorflow.TensorProto.tensor_shape', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='version_number', full_name='tensorflow.TensorProto.version_number', index=2, - number=3, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='tensor_content', full_name='tensorflow.TensorProto.tensor_content', index=3, - number=4, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='half_val', full_name='tensorflow.TensorProto.half_val', index=4, - number=13, type=5, cpp_type=1, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=_b('\020\001'), file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='float_val', full_name='tensorflow.TensorProto.float_val', index=5, - number=5, type=2, cpp_type=6, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=_b('\020\001'), file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='double_val', full_name='tensorflow.TensorProto.double_val', index=6, - number=6, type=1, cpp_type=5, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=_b('\020\001'), file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='int_val', full_name='tensorflow.TensorProto.int_val', index=7, - number=7, type=5, cpp_type=1, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=_b('\020\001'), file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='string_val', full_name='tensorflow.TensorProto.string_val', index=8, - number=8, type=12, cpp_type=9, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='scomplex_val', full_name='tensorflow.TensorProto.scomplex_val', index=9, - number=9, type=2, cpp_type=6, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=_b('\020\001'), file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='int64_val', full_name='tensorflow.TensorProto.int64_val', index=10, - number=10, type=3, cpp_type=2, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=_b('\020\001'), file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='bool_val', full_name='tensorflow.TensorProto.bool_val', index=11, - number=11, type=8, cpp_type=7, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=_b('\020\001'), file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='dcomplex_val', full_name='tensorflow.TensorProto.dcomplex_val', index=12, - number=12, type=1, cpp_type=5, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=_b('\020\001'), file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='resource_handle_val', full_name='tensorflow.TensorProto.resource_handle_val', index=13, - number=14, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='variant_val', full_name='tensorflow.TensorProto.variant_val', index=14, - number=15, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='uint32_val', full_name='tensorflow.TensorProto.uint32_val', index=15, - number=16, type=13, cpp_type=3, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=_b('\020\001'), file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='uint64_val', full_name='tensorflow.TensorProto.uint64_val', index=16, - number=17, type=4, cpp_type=4, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=_b('\020\001'), file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=189, - serialized_end=713, + name="TensorProto", + full_name="tensorflow.TensorProto", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="dtype", + full_name="tensorflow.TensorProto.dtype", + index=0, + number=1, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="tensor_shape", + full_name="tensorflow.TensorProto.tensor_shape", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="version_number", + full_name="tensorflow.TensorProto.version_number", + index=2, + number=3, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="tensor_content", + full_name="tensorflow.TensorProto.tensor_content", + index=3, + number=4, + type=12, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"", + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="half_val", + full_name="tensorflow.TensorProto.half_val", + index=4, + number=13, + type=5, + cpp_type=1, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\020\001", + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="float_val", + full_name="tensorflow.TensorProto.float_val", + index=5, + number=5, + type=2, + cpp_type=6, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\020\001", + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="double_val", + full_name="tensorflow.TensorProto.double_val", + index=6, + number=6, + type=1, + cpp_type=5, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\020\001", + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="int_val", + full_name="tensorflow.TensorProto.int_val", + index=7, + number=7, + type=5, + cpp_type=1, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\020\001", + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="string_val", + full_name="tensorflow.TensorProto.string_val", + index=8, + number=8, + type=12, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="scomplex_val", + full_name="tensorflow.TensorProto.scomplex_val", + index=9, + number=9, + type=2, + cpp_type=6, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\020\001", + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="int64_val", + full_name="tensorflow.TensorProto.int64_val", + index=10, + number=10, + type=3, + cpp_type=2, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\020\001", + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="bool_val", + full_name="tensorflow.TensorProto.bool_val", + index=11, + number=11, + type=8, + cpp_type=7, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\020\001", + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="dcomplex_val", + full_name="tensorflow.TensorProto.dcomplex_val", + index=12, + number=12, + type=1, + cpp_type=5, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\020\001", + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="resource_handle_val", + full_name="tensorflow.TensorProto.resource_handle_val", + index=13, + number=14, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="variant_val", + full_name="tensorflow.TensorProto.variant_val", + index=14, + number=15, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="uint32_val", + full_name="tensorflow.TensorProto.uint32_val", + index=15, + number=16, + type=13, + cpp_type=3, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\020\001", + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="uint64_val", + full_name="tensorflow.TensorProto.uint64_val", + index=16, + number=17, + type=4, + cpp_type=4, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\020\001", + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=189, + serialized_end=713, ) _VARIANTTENSORDATAPROTO = _descriptor.Descriptor( - name='VariantTensorDataProto', - full_name='tensorflow.VariantTensorDataProto', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='type_name', full_name='tensorflow.VariantTensorDataProto.type_name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='metadata', full_name='tensorflow.VariantTensorDataProto.metadata', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='tensors', full_name='tensorflow.VariantTensorDataProto.tensors', index=2, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=715, - serialized_end=818, + name="VariantTensorDataProto", + full_name="tensorflow.VariantTensorDataProto", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="type_name", + full_name="tensorflow.VariantTensorDataProto.type_name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="metadata", + full_name="tensorflow.VariantTensorDataProto.metadata", + index=1, + number=2, + type=12, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"", + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="tensors", + full_name="tensorflow.VariantTensorDataProto.tensors", + index=2, + number=3, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=715, + serialized_end=818, ) -_TENSORPROTO.fields_by_name['dtype'].enum_type = tensorflow_dot_core_dot_framework_dot_types__pb2._DATATYPE -_TENSORPROTO.fields_by_name['tensor_shape'].message_type = tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2._TENSORSHAPEPROTO -_TENSORPROTO.fields_by_name['resource_handle_val'].message_type = tensorflow_dot_core_dot_framework_dot_resource__handle__pb2._RESOURCEHANDLEPROTO -_TENSORPROTO.fields_by_name['variant_val'].message_type = _VARIANTTENSORDATAPROTO -_VARIANTTENSORDATAPROTO.fields_by_name['tensors'].message_type = _TENSORPROTO -DESCRIPTOR.message_types_by_name['TensorProto'] = _TENSORPROTO -DESCRIPTOR.message_types_by_name['VariantTensorDataProto'] = _VARIANTTENSORDATAPROTO +_TENSORPROTO.fields_by_name[ + "dtype" +].enum_type = tensorflow_dot_core_dot_framework_dot_types__pb2._DATATYPE +_TENSORPROTO.fields_by_name[ + "tensor_shape" +].message_type = ( + tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2._TENSORSHAPEPROTO +) +_TENSORPROTO.fields_by_name[ + "resource_handle_val" +].message_type = ( + tensorflow_dot_core_dot_framework_dot_resource__handle__pb2._RESOURCEHANDLEPROTO +) +_TENSORPROTO.fields_by_name["variant_val"].message_type = _VARIANTTENSORDATAPROTO +_VARIANTTENSORDATAPROTO.fields_by_name["tensors"].message_type = _TENSORPROTO +DESCRIPTOR.message_types_by_name["TensorProto"] = _TENSORPROTO +DESCRIPTOR.message_types_by_name["VariantTensorDataProto"] = _VARIANTTENSORDATAPROTO _sym_db.RegisterFileDescriptor(DESCRIPTOR) -TensorProto = _reflection.GeneratedProtocolMessageType('TensorProto', (_message.Message,), dict( - DESCRIPTOR = _TENSORPROTO, - __module__ = 'tensorflow.core.framework.tensor_pb2' - # @@protoc_insertion_point(class_scope:tensorflow.TensorProto) - )) +TensorProto = _reflection.GeneratedProtocolMessageType( + "TensorProto", + (_message.Message,), + { + "DESCRIPTOR": _TENSORPROTO, + "__module__": "tensorflow.core.framework.tensor_pb2" + # @@protoc_insertion_point(class_scope:tensorflow.TensorProto) + }, +) _sym_db.RegisterMessage(TensorProto) -VariantTensorDataProto = _reflection.GeneratedProtocolMessageType('VariantTensorDataProto', (_message.Message,), dict( - DESCRIPTOR = _VARIANTTENSORDATAPROTO, - __module__ = 'tensorflow.core.framework.tensor_pb2' - # @@protoc_insertion_point(class_scope:tensorflow.VariantTensorDataProto) - )) +VariantTensorDataProto = _reflection.GeneratedProtocolMessageType( + "VariantTensorDataProto", + (_message.Message,), + { + "DESCRIPTOR": _VARIANTTENSORDATAPROTO, + "__module__": "tensorflow.core.framework.tensor_pb2" + # @@protoc_insertion_point(class_scope:tensorflow.VariantTensorDataProto) + }, +) _sym_db.RegisterMessage(VariantTensorDataProto) DESCRIPTOR._options = None -_TENSORPROTO.fields_by_name['half_val']._options = None -_TENSORPROTO.fields_by_name['float_val']._options = None -_TENSORPROTO.fields_by_name['double_val']._options = None -_TENSORPROTO.fields_by_name['int_val']._options = None -_TENSORPROTO.fields_by_name['scomplex_val']._options = None -_TENSORPROTO.fields_by_name['int64_val']._options = None -_TENSORPROTO.fields_by_name['bool_val']._options = None -_TENSORPROTO.fields_by_name['dcomplex_val']._options = None -_TENSORPROTO.fields_by_name['uint32_val']._options = None -_TENSORPROTO.fields_by_name['uint64_val']._options = None +_TENSORPROTO.fields_by_name["half_val"]._options = None +_TENSORPROTO.fields_by_name["float_val"]._options = None +_TENSORPROTO.fields_by_name["double_val"]._options = None +_TENSORPROTO.fields_by_name["int_val"]._options = None +_TENSORPROTO.fields_by_name["scomplex_val"]._options = None +_TENSORPROTO.fields_by_name["int64_val"]._options = None +_TENSORPROTO.fields_by_name["bool_val"]._options = None +_TENSORPROTO.fields_by_name["dcomplex_val"]._options = None +_TENSORPROTO.fields_by_name["uint32_val"]._options = None +_TENSORPROTO.fields_by_name["uint64_val"]._options = None # @@protoc_insertion_point(module_scope) diff --git a/python/seldon_core/proto/tensorflow/core/framework/tensor_shape_pb2.py b/python/seldon_core/proto/tensorflow/core/framework/tensor_shape_pb2.py index deed79e7dc..20224c57a1 100644 --- a/python/seldon_core/proto/tensorflow/core/framework/tensor_shape_pb2.py +++ b/python/seldon_core/proto/tensorflow/core/framework/tensor_shape_pb2.py @@ -2,121 +2,160 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: tensorflow/core/framework/tensor_shape.proto -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() - - DESCRIPTOR = _descriptor.FileDescriptor( - name='tensorflow/core/framework/tensor_shape.proto', - package='tensorflow', - syntax='proto3', - serialized_options=_b('\n\030org.tensorflow.frameworkB\021TensorShapeProtosP\001ZSgithub.com/tensorflow/tensorflow/tensorflow/go/core/framework/tensor_shape_go_proto\370\001\001'), - serialized_pb=_b('\n,tensorflow/core/framework/tensor_shape.proto\x12\ntensorflow\"z\n\x10TensorShapeProto\x12-\n\x03\x64im\x18\x02 \x03(\x0b\x32 .tensorflow.TensorShapeProto.Dim\x12\x14\n\x0cunknown_rank\x18\x03 \x01(\x08\x1a!\n\x03\x44im\x12\x0c\n\x04size\x18\x01 \x01(\x03\x12\x0c\n\x04name\x18\x02 \x01(\tB\x87\x01\n\x18org.tensorflow.frameworkB\x11TensorShapeProtosP\x01ZSgithub.com/tensorflow/tensorflow/tensorflow/go/core/framework/tensor_shape_go_proto\xf8\x01\x01\x62\x06proto3') + name="tensorflow/core/framework/tensor_shape.proto", + package="tensorflow", + syntax="proto3", + serialized_options=b"\n\030org.tensorflow.frameworkB\021TensorShapeProtosP\001ZSgithub.com/tensorflow/tensorflow/tensorflow/go/core/framework/tensor_shape_go_proto\370\001\001", + serialized_pb=b'\n,tensorflow/core/framework/tensor_shape.proto\x12\ntensorflow"z\n\x10TensorShapeProto\x12-\n\x03\x64im\x18\x02 \x03(\x0b\x32 .tensorflow.TensorShapeProto.Dim\x12\x14\n\x0cunknown_rank\x18\x03 \x01(\x08\x1a!\n\x03\x44im\x12\x0c\n\x04size\x18\x01 \x01(\x03\x12\x0c\n\x04name\x18\x02 \x01(\tB\x87\x01\n\x18org.tensorflow.frameworkB\x11TensorShapeProtosP\x01ZSgithub.com/tensorflow/tensorflow/tensorflow/go/core/framework/tensor_shape_go_proto\xf8\x01\x01\x62\x06proto3', ) - - _TENSORSHAPEPROTO_DIM = _descriptor.Descriptor( - name='Dim', - full_name='tensorflow.TensorShapeProto.Dim', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='size', full_name='tensorflow.TensorShapeProto.Dim.size', index=0, - number=1, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='name', full_name='tensorflow.TensorShapeProto.Dim.name', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=149, - serialized_end=182, + name="Dim", + full_name="tensorflow.TensorShapeProto.Dim", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="size", + full_name="tensorflow.TensorShapeProto.Dim.size", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="name", + full_name="tensorflow.TensorShapeProto.Dim.name", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=149, + serialized_end=182, ) _TENSORSHAPEPROTO = _descriptor.Descriptor( - name='TensorShapeProto', - full_name='tensorflow.TensorShapeProto', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='dim', full_name='tensorflow.TensorShapeProto.dim', index=0, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='unknown_rank', full_name='tensorflow.TensorShapeProto.unknown_rank', index=1, - number=3, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[_TENSORSHAPEPROTO_DIM, ], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=60, - serialized_end=182, + name="TensorShapeProto", + full_name="tensorflow.TensorShapeProto", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="dim", + full_name="tensorflow.TensorShapeProto.dim", + index=0, + number=2, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="unknown_rank", + full_name="tensorflow.TensorShapeProto.unknown_rank", + index=1, + number=3, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[_TENSORSHAPEPROTO_DIM,], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=60, + serialized_end=182, ) _TENSORSHAPEPROTO_DIM.containing_type = _TENSORSHAPEPROTO -_TENSORSHAPEPROTO.fields_by_name['dim'].message_type = _TENSORSHAPEPROTO_DIM -DESCRIPTOR.message_types_by_name['TensorShapeProto'] = _TENSORSHAPEPROTO +_TENSORSHAPEPROTO.fields_by_name["dim"].message_type = _TENSORSHAPEPROTO_DIM +DESCRIPTOR.message_types_by_name["TensorShapeProto"] = _TENSORSHAPEPROTO _sym_db.RegisterFileDescriptor(DESCRIPTOR) -TensorShapeProto = _reflection.GeneratedProtocolMessageType('TensorShapeProto', (_message.Message,), dict( - - Dim = _reflection.GeneratedProtocolMessageType('Dim', (_message.Message,), dict( - DESCRIPTOR = _TENSORSHAPEPROTO_DIM, - __module__ = 'tensorflow.core.framework.tensor_shape_pb2' - # @@protoc_insertion_point(class_scope:tensorflow.TensorShapeProto.Dim) - )) - , - DESCRIPTOR = _TENSORSHAPEPROTO, - __module__ = 'tensorflow.core.framework.tensor_shape_pb2' - # @@protoc_insertion_point(class_scope:tensorflow.TensorShapeProto) - )) +TensorShapeProto = _reflection.GeneratedProtocolMessageType( + "TensorShapeProto", + (_message.Message,), + { + "Dim": _reflection.GeneratedProtocolMessageType( + "Dim", + (_message.Message,), + { + "DESCRIPTOR": _TENSORSHAPEPROTO_DIM, + "__module__": "tensorflow.core.framework.tensor_shape_pb2" + # @@protoc_insertion_point(class_scope:tensorflow.TensorShapeProto.Dim) + }, + ), + "DESCRIPTOR": _TENSORSHAPEPROTO, + "__module__": "tensorflow.core.framework.tensor_shape_pb2" + # @@protoc_insertion_point(class_scope:tensorflow.TensorShapeProto) + }, +) _sym_db.RegisterMessage(TensorShapeProto) _sym_db.RegisterMessage(TensorShapeProto.Dim) diff --git a/python/seldon_core/proto/tensorflow/core/framework/types_pb2.py b/python/seldon_core/proto/tensorflow/core/framework/types_pb2.py index c0d30b6925..9bb637ed38 100644 --- a/python/seldon_core/proto/tensorflow/core/framework/types_pb2.py +++ b/python/seldon_core/proto/tensorflow/core/framework/types_pb2.py @@ -2,227 +2,261 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: tensorflow/core/framework/types.proto -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() - - DESCRIPTOR = _descriptor.FileDescriptor( - name='tensorflow/core/framework/types.proto', - package='tensorflow', - syntax='proto3', - serialized_options=_b('\n\030org.tensorflow.frameworkB\013TypesProtosP\001ZLgithub.com/tensorflow/tensorflow/tensorflow/go/core/framework/types_go_proto\370\001\001'), - serialized_pb=_b('\n%tensorflow/core/framework/types.proto\x12\ntensorflow*\xaa\x06\n\x08\x44\x61taType\x12\x0e\n\nDT_INVALID\x10\x00\x12\x0c\n\x08\x44T_FLOAT\x10\x01\x12\r\n\tDT_DOUBLE\x10\x02\x12\x0c\n\x08\x44T_INT32\x10\x03\x12\x0c\n\x08\x44T_UINT8\x10\x04\x12\x0c\n\x08\x44T_INT16\x10\x05\x12\x0b\n\x07\x44T_INT8\x10\x06\x12\r\n\tDT_STRING\x10\x07\x12\x10\n\x0c\x44T_COMPLEX64\x10\x08\x12\x0c\n\x08\x44T_INT64\x10\t\x12\x0b\n\x07\x44T_BOOL\x10\n\x12\x0c\n\x08\x44T_QINT8\x10\x0b\x12\r\n\tDT_QUINT8\x10\x0c\x12\r\n\tDT_QINT32\x10\r\x12\x0f\n\x0b\x44T_BFLOAT16\x10\x0e\x12\r\n\tDT_QINT16\x10\x0f\x12\x0e\n\nDT_QUINT16\x10\x10\x12\r\n\tDT_UINT16\x10\x11\x12\x11\n\rDT_COMPLEX128\x10\x12\x12\x0b\n\x07\x44T_HALF\x10\x13\x12\x0f\n\x0b\x44T_RESOURCE\x10\x14\x12\x0e\n\nDT_VARIANT\x10\x15\x12\r\n\tDT_UINT32\x10\x16\x12\r\n\tDT_UINT64\x10\x17\x12\x10\n\x0c\x44T_FLOAT_REF\x10\x65\x12\x11\n\rDT_DOUBLE_REF\x10\x66\x12\x10\n\x0c\x44T_INT32_REF\x10g\x12\x10\n\x0c\x44T_UINT8_REF\x10h\x12\x10\n\x0c\x44T_INT16_REF\x10i\x12\x0f\n\x0b\x44T_INT8_REF\x10j\x12\x11\n\rDT_STRING_REF\x10k\x12\x14\n\x10\x44T_COMPLEX64_REF\x10l\x12\x10\n\x0c\x44T_INT64_REF\x10m\x12\x0f\n\x0b\x44T_BOOL_REF\x10n\x12\x10\n\x0c\x44T_QINT8_REF\x10o\x12\x11\n\rDT_QUINT8_REF\x10p\x12\x11\n\rDT_QINT32_REF\x10q\x12\x13\n\x0f\x44T_BFLOAT16_REF\x10r\x12\x11\n\rDT_QINT16_REF\x10s\x12\x12\n\x0e\x44T_QUINT16_REF\x10t\x12\x11\n\rDT_UINT16_REF\x10u\x12\x15\n\x11\x44T_COMPLEX128_REF\x10v\x12\x0f\n\x0b\x44T_HALF_REF\x10w\x12\x13\n\x0f\x44T_RESOURCE_REF\x10x\x12\x12\n\x0e\x44T_VARIANT_REF\x10y\x12\x11\n\rDT_UINT32_REF\x10z\x12\x11\n\rDT_UINT64_REF\x10{Bz\n\x18org.tensorflow.frameworkB\x0bTypesProtosP\x01ZLgithub.com/tensorflow/tensorflow/tensorflow/go/core/framework/types_go_proto\xf8\x01\x01\x62\x06proto3') + name="tensorflow/core/framework/types.proto", + package="tensorflow", + syntax="proto3", + serialized_options=b"\n\030org.tensorflow.frameworkB\013TypesProtosP\001ZLgithub.com/tensorflow/tensorflow/tensorflow/go/core/framework/types_go_proto\370\001\001", + serialized_pb=b"\n%tensorflow/core/framework/types.proto\x12\ntensorflow*\xaa\x06\n\x08\x44\x61taType\x12\x0e\n\nDT_INVALID\x10\x00\x12\x0c\n\x08\x44T_FLOAT\x10\x01\x12\r\n\tDT_DOUBLE\x10\x02\x12\x0c\n\x08\x44T_INT32\x10\x03\x12\x0c\n\x08\x44T_UINT8\x10\x04\x12\x0c\n\x08\x44T_INT16\x10\x05\x12\x0b\n\x07\x44T_INT8\x10\x06\x12\r\n\tDT_STRING\x10\x07\x12\x10\n\x0c\x44T_COMPLEX64\x10\x08\x12\x0c\n\x08\x44T_INT64\x10\t\x12\x0b\n\x07\x44T_BOOL\x10\n\x12\x0c\n\x08\x44T_QINT8\x10\x0b\x12\r\n\tDT_QUINT8\x10\x0c\x12\r\n\tDT_QINT32\x10\r\x12\x0f\n\x0b\x44T_BFLOAT16\x10\x0e\x12\r\n\tDT_QINT16\x10\x0f\x12\x0e\n\nDT_QUINT16\x10\x10\x12\r\n\tDT_UINT16\x10\x11\x12\x11\n\rDT_COMPLEX128\x10\x12\x12\x0b\n\x07\x44T_HALF\x10\x13\x12\x0f\n\x0b\x44T_RESOURCE\x10\x14\x12\x0e\n\nDT_VARIANT\x10\x15\x12\r\n\tDT_UINT32\x10\x16\x12\r\n\tDT_UINT64\x10\x17\x12\x10\n\x0c\x44T_FLOAT_REF\x10\x65\x12\x11\n\rDT_DOUBLE_REF\x10\x66\x12\x10\n\x0c\x44T_INT32_REF\x10g\x12\x10\n\x0c\x44T_UINT8_REF\x10h\x12\x10\n\x0c\x44T_INT16_REF\x10i\x12\x0f\n\x0b\x44T_INT8_REF\x10j\x12\x11\n\rDT_STRING_REF\x10k\x12\x14\n\x10\x44T_COMPLEX64_REF\x10l\x12\x10\n\x0c\x44T_INT64_REF\x10m\x12\x0f\n\x0b\x44T_BOOL_REF\x10n\x12\x10\n\x0c\x44T_QINT8_REF\x10o\x12\x11\n\rDT_QUINT8_REF\x10p\x12\x11\n\rDT_QINT32_REF\x10q\x12\x13\n\x0f\x44T_BFLOAT16_REF\x10r\x12\x11\n\rDT_QINT16_REF\x10s\x12\x12\n\x0e\x44T_QUINT16_REF\x10t\x12\x11\n\rDT_UINT16_REF\x10u\x12\x15\n\x11\x44T_COMPLEX128_REF\x10v\x12\x0f\n\x0b\x44T_HALF_REF\x10w\x12\x13\n\x0f\x44T_RESOURCE_REF\x10x\x12\x12\n\x0e\x44T_VARIANT_REF\x10y\x12\x11\n\rDT_UINT32_REF\x10z\x12\x11\n\rDT_UINT64_REF\x10{Bz\n\x18org.tensorflow.frameworkB\x0bTypesProtosP\x01ZLgithub.com/tensorflow/tensorflow/tensorflow/go/core/framework/types_go_proto\xf8\x01\x01\x62\x06proto3", ) _DATATYPE = _descriptor.EnumDescriptor( - name='DataType', - full_name='tensorflow.DataType', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='DT_INVALID', index=0, number=0, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_FLOAT', index=1, number=1, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_DOUBLE', index=2, number=2, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_INT32', index=3, number=3, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_UINT8', index=4, number=4, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_INT16', index=5, number=5, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_INT8', index=6, number=6, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_STRING', index=7, number=7, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_COMPLEX64', index=8, number=8, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_INT64', index=9, number=9, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_BOOL', index=10, number=10, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_QINT8', index=11, number=11, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_QUINT8', index=12, number=12, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_QINT32', index=13, number=13, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_BFLOAT16', index=14, number=14, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_QINT16', index=15, number=15, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_QUINT16', index=16, number=16, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_UINT16', index=17, number=17, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_COMPLEX128', index=18, number=18, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_HALF', index=19, number=19, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_RESOURCE', index=20, number=20, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_VARIANT', index=21, number=21, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_UINT32', index=22, number=22, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_UINT64', index=23, number=23, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_FLOAT_REF', index=24, number=101, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_DOUBLE_REF', index=25, number=102, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_INT32_REF', index=26, number=103, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_UINT8_REF', index=27, number=104, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_INT16_REF', index=28, number=105, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_INT8_REF', index=29, number=106, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_STRING_REF', index=30, number=107, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_COMPLEX64_REF', index=31, number=108, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_INT64_REF', index=32, number=109, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_BOOL_REF', index=33, number=110, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_QINT8_REF', index=34, number=111, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_QUINT8_REF', index=35, number=112, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_QINT32_REF', index=36, number=113, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_BFLOAT16_REF', index=37, number=114, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_QINT16_REF', index=38, number=115, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_QUINT16_REF', index=39, number=116, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_UINT16_REF', index=40, number=117, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_COMPLEX128_REF', index=41, number=118, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_HALF_REF', index=42, number=119, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_RESOURCE_REF', index=43, number=120, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_VARIANT_REF', index=44, number=121, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_UINT32_REF', index=45, number=122, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DT_UINT64_REF', index=46, number=123, - serialized_options=None, - type=None), - ], - containing_type=None, - serialized_options=None, - serialized_start=54, - serialized_end=864, + name="DataType", + full_name="tensorflow.DataType", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="DT_INVALID", index=0, number=0, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_FLOAT", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_DOUBLE", index=2, number=2, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_INT32", index=3, number=3, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_UINT8", index=4, number=4, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_INT16", index=5, number=5, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_INT8", index=6, number=6, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_STRING", index=7, number=7, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_COMPLEX64", index=8, number=8, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_INT64", index=9, number=9, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_BOOL", index=10, number=10, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_QINT8", index=11, number=11, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_QUINT8", index=12, number=12, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_QINT32", index=13, number=13, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_BFLOAT16", index=14, number=14, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_QINT16", index=15, number=15, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_QUINT16", index=16, number=16, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_UINT16", index=17, number=17, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_COMPLEX128", + index=18, + number=18, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="DT_HALF", index=19, number=19, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_RESOURCE", index=20, number=20, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_VARIANT", index=21, number=21, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_UINT32", index=22, number=22, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_UINT64", index=23, number=23, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_FLOAT_REF", + index=24, + number=101, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="DT_DOUBLE_REF", + index=25, + number=102, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="DT_INT32_REF", + index=26, + number=103, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="DT_UINT8_REF", + index=27, + number=104, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="DT_INT16_REF", + index=28, + number=105, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="DT_INT8_REF", index=29, number=106, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_STRING_REF", + index=30, + number=107, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="DT_COMPLEX64_REF", + index=31, + number=108, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="DT_INT64_REF", + index=32, + number=109, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="DT_BOOL_REF", index=33, number=110, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_QINT8_REF", + index=34, + number=111, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="DT_QUINT8_REF", + index=35, + number=112, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="DT_QINT32_REF", + index=36, + number=113, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="DT_BFLOAT16_REF", + index=37, + number=114, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="DT_QINT16_REF", + index=38, + number=115, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="DT_QUINT16_REF", + index=39, + number=116, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="DT_UINT16_REF", + index=40, + number=117, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="DT_COMPLEX128_REF", + index=41, + number=118, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="DT_HALF_REF", index=42, number=119, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DT_RESOURCE_REF", + index=43, + number=120, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="DT_VARIANT_REF", + index=44, + number=121, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="DT_UINT32_REF", + index=45, + number=122, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="DT_UINT64_REF", + index=46, + number=123, + serialized_options=None, + type=None, + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=54, + serialized_end=864, ) _sym_db.RegisterEnumDescriptor(_DATATYPE) @@ -276,7 +310,7 @@ DT_UINT64_REF = 123 -DESCRIPTOR.enum_types_by_name['DataType'] = _DATATYPE +DESCRIPTOR.enum_types_by_name["DataType"] = _DATATYPE _sym_db.RegisterFileDescriptor(DESCRIPTOR) diff --git a/python/seldon_core/seldon_client.py b/python/seldon_core/seldon_client.py index 132a4591d6..a12a87acd7 100644 --- a/python/seldon_core/seldon_client.py +++ b/python/seldon_core/seldon_client.py @@ -15,7 +15,7 @@ import json import logging import http.client as http_client -from google.protobuf import json_format +from google.protobuf import any_pb2, json_format logger = logging.getLogger(__name__) @@ -290,6 +290,7 @@ def predict( bin_data: Union[bytes, bytearray] = None, str_data: str = None, json_data: Union[str, List, Dict] = None, + custom_data: any_pb2.Any = None, names: Iterable[str] = None, gateway_prefix: str = None, headers: Dict = None, @@ -335,6 +336,8 @@ def predict( String payload to send - will override data json_data JSON payload to send - will override data + custom_data + Custom payload to send - will override data names Column names gateway_prefix @@ -371,6 +374,7 @@ def predict( bin_data=bin_data, str_data=str_data, json_data=json_data, + custom_data=custom_data, gateway_prefix=gateway_prefix, headers=headers, http_path=http_path, @@ -632,6 +636,7 @@ def microservice( bin_data: Union[bytes, bytearray] = None, str_data: str = None, json_data: Union[str, List, Dict] = None, + custom_data: any_pb2.Any = None, names: Iterable[str] = None, ) -> Union[SeldonClientPrediction, SeldonClientCombine]: """ @@ -676,6 +681,8 @@ def microservice( String payload to send - will override data json_data String payload to send - will override data + custom_data + Custom payload to send - will override data ndatas Multiple numpy arrays to send for aggregation bin_data @@ -711,6 +718,7 @@ def microservice( bin_data=bin_data, str_data=str_data, json_data=json_data, + custom_data=custom_data, ) self._validate_args(**k) if k["transport"] == "rest": @@ -1033,6 +1041,7 @@ def microservice_api_grpc_seldon_message( bin_data: Union[bytes, bytearray] = None, str_data: str = None, json_data: Union[str, List, Dict] = None, + custom_data: any_pb2.Any = None, grpc_max_send_message_length: int = 4 * 1024 * 1024, grpc_max_receive_message_length: int = 4 * 1024 * 1024, names: Iterable[str] = None, @@ -1059,6 +1068,8 @@ def microservice_api_grpc_seldon_message( String data to send json_data JSON data to send + custom_data + Custom data to send grpc_max_send_message_length Max grpc send message size in bytes grpc_max_receive_message_length @@ -1077,6 +1088,8 @@ def microservice_api_grpc_seldon_message( request = prediction_pb2.SeldonMessage(strData=str_data) elif json_data is not None: request = json_to_seldon_message({"jsonData": json_data}) + elif custom_data is not None: + request = prediction_pb2.SeldonMessage(customData=custom_data) else: if data is None: data = np.random.rand(*shape) @@ -1162,6 +1175,8 @@ def microservice_api_grpc_aggregate( msgs.append(prediction_pb2.SeldonMessage(binData=data)) elif isinstance(data, str): msgs.append(prediction_pb2.SeldonMessage(strData=data)) + elif isinstance(data, any_pb2.Any): + msgs.append(prediction_pb2.SeldonMessage(customData=data)) else: datadef = array_to_grpc_datadef(payload_type, data, names=names) msgs.append(prediction_pb2.SeldonMessage(data=datadef)) @@ -1382,6 +1397,7 @@ def grpc_predict_seldon_oauth( bin_data: Union[bytes, bytearray] = None, str_data: str = None, json_data: Union[str, List, Dict] = None, + custom_data: any_pb2.Any = None, grpc_max_send_message_length: int = 4 * 1024 * 1024, grpc_max_receive_message_length: int = 4 * 1024 * 1024, names: Iterable[str] = None, @@ -1411,6 +1427,10 @@ def grpc_predict_seldon_oauth( Binary data to send str_data String data to send + json_data + JSON data to send + custom_data + Custom data to send grpc_max_send_message_length Max grpc send message size in bytes grpc_max_receive_message_length @@ -1433,6 +1453,8 @@ def grpc_predict_seldon_oauth( request = prediction_pb2.SeldonMessage(strData=str_data) elif json_data is not None: request = json_to_seldon_message({"jsonData": json_data}) + elif custom_data is not None: + request = prediction_pb2.SeldonMessage(customData=custom_data) else: if data is None: data = np.random.rand(*shape) @@ -1808,6 +1830,7 @@ def grpc_predict_gateway( bin_data: Union[bytes, bytearray] = None, str_data: str = None, json_data: Union[str, List, Dict] = None, + custom_data: any_pb2.Any = None, grpc_max_send_message_length: int = 4 * 1024 * 1024, grpc_max_receive_message_length: int = 4 * 1024 * 1024, names: Iterable[str] = None, @@ -1842,6 +1865,8 @@ def grpc_predict_gateway( String data to send json_data JSON data to send + custom_data + Custom data to send grpc_max_send_message_length Max grpc send message size in bytes grpc_max_receive_message_length @@ -1875,6 +1900,8 @@ def grpc_predict_gateway( request = prediction_pb2.SeldonMessage(strData=str_data, meta=metaKV) elif json_data is not None: request = json_to_seldon_message({"jsonData": json_data}) + elif custom_data is not None: + request = prediction_pb2.SeldonMessage(customData=custom_data, meta=metaKV) else: if data is None: data = np.random.rand(*shape) diff --git a/python/seldon_core/utils.py b/python/seldon_core/utils.py index f65ff8d8f1..ebb3b6c78d 100644 --- a/python/seldon_core/utils.py +++ b/python/seldon_core/utils.py @@ -4,7 +4,7 @@ import base64 import numpy as np -from google.protobuf import json_format +from google.protobuf import json_format, any_pb2 from google.protobuf.json_format import MessageToDict, ParseDict from google.protobuf.struct_pb2 import ListValue @@ -155,6 +155,8 @@ def get_data_from_proto( return request.strData elif data_type == "jsonData": return MessageToDict(request.jsonData) + elif data_type == "customData": + return request.customData else: raise SeldonMicroserviceException("Unknown data in SeldonMessage") @@ -436,7 +438,7 @@ def construct_response( user_model: SeldonComponent, is_request: bool, client_request: prediction_pb2.SeldonMessage, - client_raw_response: Union[np.ndarray, str, bytes, dict], + client_raw_response: Union[np.ndarray, str, bytes, dict, any_pb2.Any], meta: dict = None, custom_metrics: List[Dict] = None, ) -> prediction_pb2.SeldonMessage: @@ -512,6 +514,10 @@ def construct_response( return prediction_pb2.SeldonMessage(jsonData=jsonDataResponse, meta=meta_pb) elif isinstance(client_raw_response, (bytes, bytearray)): return prediction_pb2.SeldonMessage(binData=client_raw_response, meta=meta_pb) + elif isinstance(client_raw_response, any_pb2.Any): + return prediction_pb2.SeldonMessage( + customData=client_raw_response, meta=meta_pb + ) else: raise SeldonMicroserviceException( "Unknown data type returned as payload:" + client_raw_response diff --git a/python/setup.cfg b/python/setup.cfg index 8bdbdf80b6..7a6910a258 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -45,7 +45,7 @@ commands = --with-license-file \ --no-license-path \ --output-file=./licenses/license.txt - + [tool:pytest] diff --git a/python/tests/test_seldon_client.py b/python/tests/test_seldon_client.py index 40121c8e44..4daa087310 100644 --- a/python/tests/test_seldon_client.py +++ b/python/tests/test_seldon_client.py @@ -10,11 +10,13 @@ json_to_seldon_message, ) from seldon_core.proto import prediction_pb2, prediction_pb2_grpc +from google.protobuf import any_pb2 import numpy as np import json import logging JSON_TEST_DATA = {"test": [0.0, 1.0]} +CUSTOM_TEST_DATA = any_pb2.Any(value=b"test") class MockResponse: @@ -287,6 +289,13 @@ def test_grpc_predict_json_data_ambassador(): assert response.response.strData == "predict" +@mock.patch("seldon_core.seldon_client.prediction_pb2_grpc.SeldonStub", new=MyStub) +def test_grpc_predict_custom_data_ambassador(): + sc = SeldonClient(deployment_name="mymodel", transport="grpc", gateway="ambassador") + response = sc.predict(custom_data=CUSTOM_TEST_DATA, client_return_type="proto") + assert response.response.strData == "predict" + + @mock.patch("seldon_core.seldon_client.prediction_pb2_grpc.SeldonStub", new=MyStub) @mock.patch("seldon_core.seldon_client.get_token", side_effect=mock_get_token) def test_predict_grpc_seldon(mock_get_token): @@ -309,6 +318,19 @@ def test_grpc_predict_json_data_seldon(mock_get_token): assert response.response.strData == "predict" +@mock.patch("seldon_core.seldon_client.prediction_pb2_grpc.SeldonStub", new=MyStub) +@mock.patch("seldon_core.seldon_client.get_token", side_effect=mock_get_token) +def test_grpc_predict_custom_data_seldon(mock_get_token): + sc = SeldonClient( + deployment_name="mymodel", + transport="grpc", + gateway="seldon", + client_return_type="proto", + ) + response = sc.predict(custom_data=CUSTOM_TEST_DATA) + assert response.response.strData == "predict" + + @mock.patch("seldon_core.seldon_client.prediction_pb2_grpc.ModelStub", new=MyStub) def test_predict_grpc_microservice_predict(): sc = SeldonClient(transport="grpc") diff --git a/python/tests/test_utils.py b/python/tests/test_utils.py index f2d725319f..738d8fd696 100644 --- a/python/tests/test_utils.py +++ b/python/tests/test_utils.py @@ -8,6 +8,7 @@ from seldon_core.flask_utils import SeldonMicroserviceException from seldon_core.imports_helper import _TF_PRESENT from google.protobuf.struct_pb2 import Value +from google.protobuf import any_pb2 from .utils import skipif_tf_missing if _TF_PRESENT: @@ -181,6 +182,18 @@ def test_create_grpc_response_jsondata(): assert sm.jsonData != emptyValue +def test_create_grpc_response_customdata(): + user_model = UserObject() + request_data = np.array([[5, 6, 7]]) + datadef = scu.array_to_grpc_datadef("ndarray", request_data) + request = prediction_pb2.SeldonMessage(data=datadef) + raw_response = any_pb2.Any(value=b"testdata") + sm = scu.construct_response(user_model, True, request, raw_response) + assert sm.data.WhichOneof("data_oneof") is None + emptyValue = Value() + assert sm.customData != emptyValue + + def test_create_rest_response_jsondata(): user_model = UserObject() request_data = np.array([[5, 6, 7]])