diff --git a/Makefile b/Makefile index acfbb3785..53263bc48 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ NAME="github.com/odpf/meteor" VERSION=$(shell git describe --always --tags 2>/dev/null) COVERFILE="/tmp/app.coverprofile" -PROTON_COMMIT := "a3dd74d3f400f43719a647e61d56d0e2e3bc906f" +PROTON_COMMIT := "0acbe8af97af5565155f332b1c837ce5e9fb6956" .PHONY: all build clean test all: build diff --git a/models/odpf/assets/v1beta2/asset.pb.go b/models/odpf/assets/v1beta2/asset.pb.go index 9d4a55ee4..9cdf9f39d 100644 --- a/models/odpf/assets/v1beta2/asset.pb.go +++ b/models/odpf/assets/v1beta2/asset.pb.go @@ -22,19 +22,19 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Job is a resource that represents a job. +// Asset is a resource that represents any type of asset. type Asset struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The unique identifier of the asset/resource. + // The unique identifier of the asset. // Example: `user:jdoe` or `group:accounting`. Urn string `protobuf:"bytes,1,opt,name=urn,proto3" json:"urn,omitempty"` - // The name of the resource. + // The name of the asset. // Example: `John Doe` or `Accounting`. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // The source of the resource. + // The source of the asset. // Example: `github` or `bigquery`. Service string `protobuf:"bytes,3,opt,name=service,proto3" json:"service,omitempty"` // The type of the asset. @@ -49,7 +49,7 @@ type Asset struct { // Represents Data in asset, can be of type bucket, dashboard, group ... user Data *anypb.Any `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"` // The ownership of the job. - // For an example check out ownership. + // For an example check out Owner. Owners []*Owner `protobuf:"bytes,31,rep,name=owners,proto3" json:"owners,omitempty"` // The lineage of the job. // For an example check out lineage schema. diff --git a/models/odpf/assets/v1beta2/feature_table.pb.go b/models/odpf/assets/v1beta2/feature_table.pb.go new file mode 100644 index 000000000..2f739058c --- /dev/null +++ b/models/odpf/assets/v1beta2/feature_table.pb.go @@ -0,0 +1,412 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: odpf/assets/v1beta2/feature_table.proto + +package assetsv1beta2 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Feature is a Machine Learning(ML) feature. In machine learning, a feature +// is an individual measurable property, typically represented by a column, +// that serves as an input for Machine Learning (ML) algorithms. +type Feature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the field. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The data type associated with an individual ML Feature. + DataType string `protobuf:"bytes,2,opt,name=data_type,json=dataType,proto3" json:"data_type,omitempty"` + // Optional: Name of the algorithm used to compute the feature, e.g., PCA, + // bucketing etc. + Algorithm string `protobuf:"bytes,3,opt,name=algorithm,proto3" json:"algorithm,omitempty"` + // Optional: Name of the entity instance. + EntityName string `protobuf:"bytes,4,opt,name=entity_name,json=entityName,proto3" json:"entity_name,omitempty"` +} + +func (x *Feature) Reset() { + *x = Feature{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_assets_v1beta2_feature_table_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Feature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Feature) ProtoMessage() {} + +func (x *Feature) ProtoReflect() protoreflect.Message { + mi := &file_odpf_assets_v1beta2_feature_table_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Feature.ProtoReflect.Descriptor instead. +func (*Feature) Descriptor() ([]byte, []int) { + return file_odpf_assets_v1beta2_feature_table_proto_rawDescGZIP(), []int{0} +} + +func (x *Feature) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Feature) GetDataType() string { + if x != nil { + return x.DataType + } + return "" +} + +func (x *Feature) GetAlgorithm() string { + if x != nil { + return x.Algorithm + } + return "" +} + +func (x *Feature) GetEntityName() string { + if x != nil { + return x.EntityName + } + return "" +} + +// FeatureTable is a Machine Learning(ML) feature table or view that +// represents a logical group of time-series feature data as it is found in a +// data source. +type FeatureTable struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional: Feature store's namespace or project. + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + // Optional: The list of entities that this feature view is associated with. + Entities []*FeatureTable_Entity `protobuf:"bytes,2,rep,name=entities,proto3" json:"entities,omitempty"` + // Features that are part of the table, akin to columns in a table. + Features []*Feature `protobuf:"bytes,3,rep,name=features,proto3" json:"features,omitempty"` + // The timestamp when the feature table was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,101,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // The timestamp when the feature table was last modified. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,102,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` +} + +func (x *FeatureTable) Reset() { + *x = FeatureTable{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_assets_v1beta2_feature_table_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FeatureTable) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FeatureTable) ProtoMessage() {} + +func (x *FeatureTable) ProtoReflect() protoreflect.Message { + mi := &file_odpf_assets_v1beta2_feature_table_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FeatureTable.ProtoReflect.Descriptor instead. +func (*FeatureTable) Descriptor() ([]byte, []int) { + return file_odpf_assets_v1beta2_feature_table_proto_rawDescGZIP(), []int{1} +} + +func (x *FeatureTable) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *FeatureTable) GetEntities() []*FeatureTable_Entity { + if x != nil { + return x.Entities + } + return nil +} + +func (x *FeatureTable) GetFeatures() []*Feature { + if x != nil { + return x.Features + } + return nil +} + +func (x *FeatureTable) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *FeatureTable) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +// An entity is a collection of semantically related features. Users define +// entities to map to the domain of their use case. For example, a +// ride-hailing service could have customers and drivers as their entities, +// which group related features that correspond to these customers and drivers. +type FeatureTable_Entity struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique name of the entity. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // A property that uniquely identifies different entities within the + // collection. The join_key property is typically used for joining entities + // with their associated features. + JoinKeys []string `protobuf:"bytes,2,rep,name=join_keys,json=joinKeys,proto3" json:"join_keys,omitempty"` + // Optional: Arbitrary metadata. + Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *FeatureTable_Entity) Reset() { + *x = FeatureTable_Entity{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_assets_v1beta2_feature_table_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FeatureTable_Entity) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FeatureTable_Entity) ProtoMessage() {} + +func (x *FeatureTable_Entity) ProtoReflect() protoreflect.Message { + mi := &file_odpf_assets_v1beta2_feature_table_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FeatureTable_Entity.ProtoReflect.Descriptor instead. +func (*FeatureTable_Entity) Descriptor() ([]byte, []int) { + return file_odpf_assets_v1beta2_feature_table_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *FeatureTable_Entity) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *FeatureTable_Entity) GetJoinKeys() []string { + if x != nil { + return x.JoinKeys + } + return nil +} + +func (x *FeatureTable_Entity) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +var File_odpf_assets_v1beta2_feature_table_proto protoreflect.FileDescriptor + +var file_odpf_assets_v1beta2_feature_table_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x6f, 0x64, 0x70, 0x66, 0x2e, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x1a, 0x1f, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x79, 0x0a, 0x07, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, + 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, + 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xeb, 0x03, 0x0a, 0x0c, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x08, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x64, + 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x45, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, + 0x38, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, + 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x1a, 0xc2, 0x01, 0x0a, 0x06, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x6f, 0x69, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x12, + 0x4c, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x34, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, + 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x53, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x6f, + 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x42, 0x0c, 0x46, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, + 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x3b, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_odpf_assets_v1beta2_feature_table_proto_rawDescOnce sync.Once + file_odpf_assets_v1beta2_feature_table_proto_rawDescData = file_odpf_assets_v1beta2_feature_table_proto_rawDesc +) + +func file_odpf_assets_v1beta2_feature_table_proto_rawDescGZIP() []byte { + file_odpf_assets_v1beta2_feature_table_proto_rawDescOnce.Do(func() { + file_odpf_assets_v1beta2_feature_table_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_v1beta2_feature_table_proto_rawDescData) + }) + return file_odpf_assets_v1beta2_feature_table_proto_rawDescData +} + +var file_odpf_assets_v1beta2_feature_table_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_odpf_assets_v1beta2_feature_table_proto_goTypes = []interface{}{ + (*Feature)(nil), // 0: odpf.assets.v1beta2.Feature + (*FeatureTable)(nil), // 1: odpf.assets.v1beta2.FeatureTable + (*FeatureTable_Entity)(nil), // 2: odpf.assets.v1beta2.FeatureTable.Entity + nil, // 3: odpf.assets.v1beta2.FeatureTable.Entity.LabelsEntry + (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp +} +var file_odpf_assets_v1beta2_feature_table_proto_depIdxs = []int32{ + 2, // 0: odpf.assets.v1beta2.FeatureTable.entities:type_name -> odpf.assets.v1beta2.FeatureTable.Entity + 0, // 1: odpf.assets.v1beta2.FeatureTable.features:type_name -> odpf.assets.v1beta2.Feature + 4, // 2: odpf.assets.v1beta2.FeatureTable.create_time:type_name -> google.protobuf.Timestamp + 4, // 3: odpf.assets.v1beta2.FeatureTable.update_time:type_name -> google.protobuf.Timestamp + 3, // 4: odpf.assets.v1beta2.FeatureTable.Entity.labels:type_name -> odpf.assets.v1beta2.FeatureTable.Entity.LabelsEntry + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_odpf_assets_v1beta2_feature_table_proto_init() } +func file_odpf_assets_v1beta2_feature_table_proto_init() { + if File_odpf_assets_v1beta2_feature_table_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_odpf_assets_v1beta2_feature_table_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Feature); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_assets_v1beta2_feature_table_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FeatureTable); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_assets_v1beta2_feature_table_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FeatureTable_Entity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_odpf_assets_v1beta2_feature_table_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_odpf_assets_v1beta2_feature_table_proto_goTypes, + DependencyIndexes: file_odpf_assets_v1beta2_feature_table_proto_depIdxs, + MessageInfos: file_odpf_assets_v1beta2_feature_table_proto_msgTypes, + }.Build() + File_odpf_assets_v1beta2_feature_table_proto = out.File + file_odpf_assets_v1beta2_feature_table_proto_rawDesc = nil + file_odpf_assets_v1beta2_feature_table_proto_goTypes = nil + file_odpf_assets_v1beta2_feature_table_proto_depIdxs = nil +} diff --git a/models/odpf/assets/v1beta2/ml_feature.pb.go b/models/odpf/assets/v1beta2/ml_feature.pb.go deleted file mode 100644 index 8e49992f4..000000000 --- a/models/odpf/assets/v1beta2/ml_feature.pb.go +++ /dev/null @@ -1,412 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc (unknown) -// source: odpf/assets/v1beta2/ml_feature.proto - -package assetsv1beta2 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MLFeature is a Machine Learning(ML) feature. In machine learning, a feature -// is an individual measurable property, typically represented by a column, -// that serves as an input for Machine Learning (ML) algorithms. -type MLFeature struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the field. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The data type associated with an individual ML Feature. - DataType string `protobuf:"bytes,2,opt,name=data_type,json=dataType,proto3" json:"data_type,omitempty"` - // Optional: Name of the algorithm used to compute the feature, e.g., PCA, - // bucketing etc. - Algorithm string `protobuf:"bytes,3,opt,name=algorithm,proto3" json:"algorithm,omitempty"` - // Optional: Name of the entity instance. - EntityName string `protobuf:"bytes,4,opt,name=entity_name,json=entityName,proto3" json:"entity_name,omitempty"` -} - -func (x *MLFeature) Reset() { - *x = MLFeature{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_v1beta2_ml_feature_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MLFeature) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MLFeature) ProtoMessage() {} - -func (x *MLFeature) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_v1beta2_ml_feature_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MLFeature.ProtoReflect.Descriptor instead. -func (*MLFeature) Descriptor() ([]byte, []int) { - return file_odpf_assets_v1beta2_ml_feature_proto_rawDescGZIP(), []int{0} -} - -func (x *MLFeature) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *MLFeature) GetDataType() string { - if x != nil { - return x.DataType - } - return "" -} - -func (x *MLFeature) GetAlgorithm() string { - if x != nil { - return x.Algorithm - } - return "" -} - -func (x *MLFeature) GetEntityName() string { - if x != nil { - return x.EntityName - } - return "" -} - -// MLFeatureTable is a Machine Learning(ML) feature table or view that -// represents a logical group of time-series feature data as it is found in a -// data source. -type MLFeatureTable struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Optional: Feature store's namespace or project. - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - // Optional: The list of entities that this feature view is associated with. - Entities []*MLFeatureTable_Entity `protobuf:"bytes,2,rep,name=entities,proto3" json:"entities,omitempty"` - // Features that are part of the table, akin to columns in a table. - Features []*MLFeature `protobuf:"bytes,3,rep,name=features,proto3" json:"features,omitempty"` - // The timestamp when the feature table was created. - CreateTime *timestamppb.Timestamp `protobuf:"bytes,101,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // The timestamp when the feature table was last modified. - UpdateTime *timestamppb.Timestamp `protobuf:"bytes,102,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` -} - -func (x *MLFeatureTable) Reset() { - *x = MLFeatureTable{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_v1beta2_ml_feature_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MLFeatureTable) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MLFeatureTable) ProtoMessage() {} - -func (x *MLFeatureTable) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_v1beta2_ml_feature_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MLFeatureTable.ProtoReflect.Descriptor instead. -func (*MLFeatureTable) Descriptor() ([]byte, []int) { - return file_odpf_assets_v1beta2_ml_feature_proto_rawDescGZIP(), []int{1} -} - -func (x *MLFeatureTable) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *MLFeatureTable) GetEntities() []*MLFeatureTable_Entity { - if x != nil { - return x.Entities - } - return nil -} - -func (x *MLFeatureTable) GetFeatures() []*MLFeature { - if x != nil { - return x.Features - } - return nil -} - -func (x *MLFeatureTable) GetCreateTime() *timestamppb.Timestamp { - if x != nil { - return x.CreateTime - } - return nil -} - -func (x *MLFeatureTable) GetUpdateTime() *timestamppb.Timestamp { - if x != nil { - return x.UpdateTime - } - return nil -} - -// An entity is a collection of semantically related features. Users define -// entities to map to the domain of their use case. For example, a -// ride-hailing service could have customers and drivers as their entities, -// which group related features that correspond to these customers and drivers. -type MLFeatureTable_Entity struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The unique name of the entity. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // A property that uniquely identifies different entities within the - // collection. The join_key property is typically used for joining entities - // with their associated features. - JoinKeys []string `protobuf:"bytes,2,rep,name=join_keys,json=joinKeys,proto3" json:"join_keys,omitempty"` - // Optional: Arbitrary metadata. - Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *MLFeatureTable_Entity) Reset() { - *x = MLFeatureTable_Entity{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_v1beta2_ml_feature_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MLFeatureTable_Entity) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MLFeatureTable_Entity) ProtoMessage() {} - -func (x *MLFeatureTable_Entity) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_v1beta2_ml_feature_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MLFeatureTable_Entity.ProtoReflect.Descriptor instead. -func (*MLFeatureTable_Entity) Descriptor() ([]byte, []int) { - return file_odpf_assets_v1beta2_ml_feature_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *MLFeatureTable_Entity) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *MLFeatureTable_Entity) GetJoinKeys() []string { - if x != nil { - return x.JoinKeys - } - return nil -} - -func (x *MLFeatureTable_Entity) GetLabels() map[string]string { - if x != nil { - return x.Labels - } - return nil -} - -var File_odpf_assets_v1beta2_ml_feature_proto protoreflect.FileDescriptor - -var file_odpf_assets_v1beta2_ml_feature_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x6d, 0x6c, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7b, 0x0a, 0x09, - 0x4d, 0x4c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, - 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x6c, - 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, - 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xf3, 0x03, 0x0a, 0x0e, 0x4d, 0x4c, - 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x46, 0x0a, 0x08, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, - 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x32, 0x2e, 0x4d, 0x4c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, - 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4d, 0x4c, 0x46, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x3b, - 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x65, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0xc4, 0x01, 0x0a, 0x06, 0x45, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x5f, - 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x6f, 0x69, 0x6e, - 0x4b, 0x65, 0x79, 0x73, 0x12, 0x4e, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4d, 0x4c, 0x46, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, - 0x55, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x42, 0x0e, 0x4d, 0x4c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, - 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x3b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_odpf_assets_v1beta2_ml_feature_proto_rawDescOnce sync.Once - file_odpf_assets_v1beta2_ml_feature_proto_rawDescData = file_odpf_assets_v1beta2_ml_feature_proto_rawDesc -) - -func file_odpf_assets_v1beta2_ml_feature_proto_rawDescGZIP() []byte { - file_odpf_assets_v1beta2_ml_feature_proto_rawDescOnce.Do(func() { - file_odpf_assets_v1beta2_ml_feature_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_v1beta2_ml_feature_proto_rawDescData) - }) - return file_odpf_assets_v1beta2_ml_feature_proto_rawDescData -} - -var file_odpf_assets_v1beta2_ml_feature_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_odpf_assets_v1beta2_ml_feature_proto_goTypes = []interface{}{ - (*MLFeature)(nil), // 0: odpf.assets.v1beta2.MLFeature - (*MLFeatureTable)(nil), // 1: odpf.assets.v1beta2.MLFeatureTable - (*MLFeatureTable_Entity)(nil), // 2: odpf.assets.v1beta2.MLFeatureTable.Entity - nil, // 3: odpf.assets.v1beta2.MLFeatureTable.Entity.LabelsEntry - (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp -} -var file_odpf_assets_v1beta2_ml_feature_proto_depIdxs = []int32{ - 2, // 0: odpf.assets.v1beta2.MLFeatureTable.entities:type_name -> odpf.assets.v1beta2.MLFeatureTable.Entity - 0, // 1: odpf.assets.v1beta2.MLFeatureTable.features:type_name -> odpf.assets.v1beta2.MLFeature - 4, // 2: odpf.assets.v1beta2.MLFeatureTable.create_time:type_name -> google.protobuf.Timestamp - 4, // 3: odpf.assets.v1beta2.MLFeatureTable.update_time:type_name -> google.protobuf.Timestamp - 3, // 4: odpf.assets.v1beta2.MLFeatureTable.Entity.labels:type_name -> odpf.assets.v1beta2.MLFeatureTable.Entity.LabelsEntry - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_odpf_assets_v1beta2_ml_feature_proto_init() } -func file_odpf_assets_v1beta2_ml_feature_proto_init() { - if File_odpf_assets_v1beta2_ml_feature_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_odpf_assets_v1beta2_ml_feature_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MLFeature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_assets_v1beta2_ml_feature_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MLFeatureTable); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_assets_v1beta2_ml_feature_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MLFeatureTable_Entity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_odpf_assets_v1beta2_ml_feature_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_odpf_assets_v1beta2_ml_feature_proto_goTypes, - DependencyIndexes: file_odpf_assets_v1beta2_ml_feature_proto_depIdxs, - MessageInfos: file_odpf_assets_v1beta2_ml_feature_proto_msgTypes, - }.Build() - File_odpf_assets_v1beta2_ml_feature_proto = out.File - file_odpf_assets_v1beta2_ml_feature_proto_rawDesc = nil - file_odpf_assets_v1beta2_ml_feature_proto_goTypes = nil - file_odpf_assets_v1beta2_ml_feature_proto_depIdxs = nil -} diff --git a/models/odpf/assets/v1beta2/ml_model.pb.go b/models/odpf/assets/v1beta2/ml_model.pb.go deleted file mode 100644 index a879e33b0..000000000 --- a/models/odpf/assets/v1beta2/ml_model.pb.go +++ /dev/null @@ -1,437 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc (unknown) -// source: odpf/assets/v1beta2/ml_model.proto - -package assetsv1beta2 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - structpb "google.golang.org/protobuf/types/known/structpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MLModel represents a Machine Learning(ML) Model. Models are algorithms trained -// on data to find patterns or make predictions. Models typically consume -// ML features to generate a meaningful output. The inputs can also include -// contextual information that is made available in realtime as part of the -// request to the model server. -type MLModel struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Optional: Model's namespace or project. - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - // Flavor of the ML Model. ex: pytorch, tensorflow etc. - Flavor string `protobuf:"bytes,2,opt,name=flavor,proto3" json:"flavor,omitempty"` - // Optional: Algorithm used to train the ML Model. - Algorithm string `protobuf:"bytes,3,opt,name=algorithm,proto3" json:"algorithm,omitempty"` - // The schema of a model’s inputs and outputs. - Signature *MLModel_Signature `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` - // Status of the model. ex: pending/ready/serving/terminated etc. - State string `protobuf:"bytes,5,opt,name=state,proto3" json:"state,omitempty"` - // Version of the model - Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"` - // List of attributes the model has. This could include the following: - // - endpoint_url[string]: Endpoint that the model is serving requests on. - // Ex: http://-... - // - version_endpoint_url[string]: Endpoint that the model is serving - // requests on for the specific version. Ex: - // http://-... - // - traffic[double]: Percentage of traffic being served by this version of - // the model. - // - params[map]: Parameters for the Model's run. - // - metrics[map]: Metrics for the model's run. - Attributes *structpb.Struct `protobuf:"bytes,7,opt,name=attributes,proto3" json:"attributes,omitempty"` - // The timestamp of the model's creation. - CreateTime *timestamppb.Timestamp `protobuf:"bytes,101,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // The timestamp when the model was last modified. - UpdateTime *timestamppb.Timestamp `protobuf:"bytes,102,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` -} - -func (x *MLModel) Reset() { - *x = MLModel{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_v1beta2_ml_model_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MLModel) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MLModel) ProtoMessage() {} - -func (x *MLModel) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_v1beta2_ml_model_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MLModel.ProtoReflect.Descriptor instead. -func (*MLModel) Descriptor() ([]byte, []int) { - return file_odpf_assets_v1beta2_ml_model_proto_rawDescGZIP(), []int{0} -} - -func (x *MLModel) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *MLModel) GetFlavor() string { - if x != nil { - return x.Flavor - } - return "" -} - -func (x *MLModel) GetAlgorithm() string { - if x != nil { - return x.Algorithm - } - return "" -} - -func (x *MLModel) GetSignature() *MLModel_Signature { - if x != nil { - return x.Signature - } - return nil -} - -func (x *MLModel) GetState() string { - if x != nil { - return x.State - } - return "" -} - -func (x *MLModel) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *MLModel) GetAttributes() *structpb.Struct { - if x != nil { - return x.Attributes - } - return nil -} - -func (x *MLModel) GetCreateTime() *timestamppb.Timestamp { - if x != nil { - return x.CreateTime - } - return nil -} - -func (x *MLModel) GetUpdateTime() *timestamppb.Timestamp { - if x != nil { - return x.UpdateTime - } - return nil -} - -// Schema of the model's inputs and outputs. Strongly inspired by -// https://mlflow.org/docs/latest/python_api/mlflow.models.html#mlflow.models.ModelSignature. -type MLModel_Signature struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Inputs []*MLModel_Signature_Parameter `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs,omitempty"` - Outputs []*MLModel_Signature_Parameter `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"` -} - -func (x *MLModel_Signature) Reset() { - *x = MLModel_Signature{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_v1beta2_ml_model_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MLModel_Signature) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MLModel_Signature) ProtoMessage() {} - -func (x *MLModel_Signature) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_v1beta2_ml_model_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MLModel_Signature.ProtoReflect.Descriptor instead. -func (*MLModel_Signature) Descriptor() ([]byte, []int) { - return file_odpf_assets_v1beta2_ml_model_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *MLModel_Signature) GetInputs() []*MLModel_Signature_Parameter { - if x != nil { - return x.Inputs - } - return nil -} - -func (x *MLModel_Signature) GetOutputs() []*MLModel_Signature_Parameter { - if x != nil { - return x.Outputs - } - return nil -} - -// Specification of name and type of a single column in a dataset. -type MLModel_Signature_Parameter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Optional: Name of the input or output parameter. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Data type of the parameter. Ex: boolean, double, numpy's dtypes etc. - DataType string `protobuf:"bytes,2,opt,name=data_type,json=dataType,proto3" json:"data_type,omitempty"` - // Optional: The tensor shape. - Shape []int64 `protobuf:"varint,3,rep,packed,name=shape,proto3" json:"shape,omitempty"` -} - -func (x *MLModel_Signature_Parameter) Reset() { - *x = MLModel_Signature_Parameter{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_v1beta2_ml_model_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MLModel_Signature_Parameter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MLModel_Signature_Parameter) ProtoMessage() {} - -func (x *MLModel_Signature_Parameter) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_v1beta2_ml_model_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MLModel_Signature_Parameter.ProtoReflect.Descriptor instead. -func (*MLModel_Signature_Parameter) Descriptor() ([]byte, []int) { - return file_odpf_assets_v1beta2_ml_model_proto_rawDescGZIP(), []int{0, 0, 0} -} - -func (x *MLModel_Signature_Parameter) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *MLModel_Signature_Parameter) GetDataType() string { - if x != nil { - return x.DataType - } - return "" -} - -func (x *MLModel_Signature_Parameter) GetShape() []int64 { - if x != nil { - return x.Shape - } - return nil -} - -var File_odpf_assets_v1beta2_ml_model_proto protoreflect.FileDescriptor - -var file_odpf_assets_v1beta2_ml_model_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x6d, 0x6c, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfe, 0x04, 0x0a, 0x07, 0x4d, 0x4c, 0x4d, - 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x66, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x6c, - 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, - 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x44, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x64, - 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x32, 0x2e, 0x4d, 0x4c, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x37, - 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0a, 0x61, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x1a, 0xf5, 0x01, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, - 0x48, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x30, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4d, 0x4c, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x52, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x07, 0x6f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, - 0x2e, 0x4d, 0x4c, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x07, 0x6f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x73, 0x1a, 0x52, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x03, 0x52, 0x05, 0x73, 0x68, 0x61, 0x70, 0x65, 0x42, 0x53, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, - 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x42, 0x0c, 0x4d, 0x4c, 0x4d, - 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x6e, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, - 0x3b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_odpf_assets_v1beta2_ml_model_proto_rawDescOnce sync.Once - file_odpf_assets_v1beta2_ml_model_proto_rawDescData = file_odpf_assets_v1beta2_ml_model_proto_rawDesc -) - -func file_odpf_assets_v1beta2_ml_model_proto_rawDescGZIP() []byte { - file_odpf_assets_v1beta2_ml_model_proto_rawDescOnce.Do(func() { - file_odpf_assets_v1beta2_ml_model_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_v1beta2_ml_model_proto_rawDescData) - }) - return file_odpf_assets_v1beta2_ml_model_proto_rawDescData -} - -var file_odpf_assets_v1beta2_ml_model_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_odpf_assets_v1beta2_ml_model_proto_goTypes = []interface{}{ - (*MLModel)(nil), // 0: odpf.assets.v1beta2.MLModel - (*MLModel_Signature)(nil), // 1: odpf.assets.v1beta2.MLModel.Signature - (*MLModel_Signature_Parameter)(nil), // 2: odpf.assets.v1beta2.MLModel.Signature.Parameter - (*structpb.Struct)(nil), // 3: google.protobuf.Struct - (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp -} -var file_odpf_assets_v1beta2_ml_model_proto_depIdxs = []int32{ - 1, // 0: odpf.assets.v1beta2.MLModel.signature:type_name -> odpf.assets.v1beta2.MLModel.Signature - 3, // 1: odpf.assets.v1beta2.MLModel.attributes:type_name -> google.protobuf.Struct - 4, // 2: odpf.assets.v1beta2.MLModel.create_time:type_name -> google.protobuf.Timestamp - 4, // 3: odpf.assets.v1beta2.MLModel.update_time:type_name -> google.protobuf.Timestamp - 2, // 4: odpf.assets.v1beta2.MLModel.Signature.inputs:type_name -> odpf.assets.v1beta2.MLModel.Signature.Parameter - 2, // 5: odpf.assets.v1beta2.MLModel.Signature.outputs:type_name -> odpf.assets.v1beta2.MLModel.Signature.Parameter - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_odpf_assets_v1beta2_ml_model_proto_init() } -func file_odpf_assets_v1beta2_ml_model_proto_init() { - if File_odpf_assets_v1beta2_ml_model_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_odpf_assets_v1beta2_ml_model_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MLModel); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_assets_v1beta2_ml_model_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MLModel_Signature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_assets_v1beta2_ml_model_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MLModel_Signature_Parameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_odpf_assets_v1beta2_ml_model_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_odpf_assets_v1beta2_ml_model_proto_goTypes, - DependencyIndexes: file_odpf_assets_v1beta2_ml_model_proto_depIdxs, - MessageInfos: file_odpf_assets_v1beta2_ml_model_proto_msgTypes, - }.Build() - File_odpf_assets_v1beta2_ml_model_proto = out.File - file_odpf_assets_v1beta2_ml_model_proto_rawDesc = nil - file_odpf_assets_v1beta2_ml_model_proto_goTypes = nil - file_odpf_assets_v1beta2_ml_model_proto_depIdxs = nil -} diff --git a/models/odpf/assets/v1beta2/model.pb.go b/models/odpf/assets/v1beta2/model.pb.go new file mode 100644 index 000000000..3bb438ac4 --- /dev/null +++ b/models/odpf/assets/v1beta2/model.pb.go @@ -0,0 +1,436 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: odpf/assets/v1beta2/model.proto + +package assetsv1beta2 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Model represents a Data Science Model commonly used for Machine Learning +// (ML). Models are algorithms trained on data to find patterns or make +// predictions. Models typically consume ML features to generate a meaningful +// output. The inputs can also include contextual information that is made +// available in realtime as part of the request to the model server. +type Model struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional: Model's namespace or project. + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + // Flavor of the ML Model. ex: pytorch, tensorflow etc. + Flavor string `protobuf:"bytes,2,opt,name=flavor,proto3" json:"flavor,omitempty"` + // Optional: Algorithm used to train the ML Model. + Algorithm string `protobuf:"bytes,3,opt,name=algorithm,proto3" json:"algorithm,omitempty"` + // The schema of a model’s inputs and outputs. + Signature *Model_Signature `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` + // Status of the model. ex: pending/ready/serving/terminated etc. + State string `protobuf:"bytes,5,opt,name=state,proto3" json:"state,omitempty"` + // Version of the model + Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"` + // List of attributes the model has. This could include the following: + // - endpoint_url[string]: Endpoint that the model is serving requests on. + // Ex: http://-... + // - version_endpoint_url[string]: Endpoint that the model is serving + // requests on for the specific version. Ex: + // http://-... + // - traffic[double]: Percentage of traffic being served by this version of + // the model. + // - params[map]: Parameters for the Model's run. + // - metrics[map]: Metrics for the model's run. + Attributes *structpb.Struct `protobuf:"bytes,7,opt,name=attributes,proto3" json:"attributes,omitempty"` + // The timestamp of the model's creation. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,101,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // The timestamp when the model was last modified. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,102,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` +} + +func (x *Model) Reset() { + *x = Model{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_assets_v1beta2_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Model) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Model) ProtoMessage() {} + +func (x *Model) ProtoReflect() protoreflect.Message { + mi := &file_odpf_assets_v1beta2_model_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Model.ProtoReflect.Descriptor instead. +func (*Model) Descriptor() ([]byte, []int) { + return file_odpf_assets_v1beta2_model_proto_rawDescGZIP(), []int{0} +} + +func (x *Model) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *Model) GetFlavor() string { + if x != nil { + return x.Flavor + } + return "" +} + +func (x *Model) GetAlgorithm() string { + if x != nil { + return x.Algorithm + } + return "" +} + +func (x *Model) GetSignature() *Model_Signature { + if x != nil { + return x.Signature + } + return nil +} + +func (x *Model) GetState() string { + if x != nil { + return x.State + } + return "" +} + +func (x *Model) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *Model) GetAttributes() *structpb.Struct { + if x != nil { + return x.Attributes + } + return nil +} + +func (x *Model) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Model) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +// Schema of the model's inputs and outputs. Strongly inspired by +// https://mlflow.org/docs/latest/python_api/mlflow.models.html#mlflow.models.ModelSignature. +type Model_Signature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Inputs []*Model_Signature_Parameter `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs,omitempty"` + Outputs []*Model_Signature_Parameter `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"` +} + +func (x *Model_Signature) Reset() { + *x = Model_Signature{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_assets_v1beta2_model_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Model_Signature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Model_Signature) ProtoMessage() {} + +func (x *Model_Signature) ProtoReflect() protoreflect.Message { + mi := &file_odpf_assets_v1beta2_model_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Model_Signature.ProtoReflect.Descriptor instead. +func (*Model_Signature) Descriptor() ([]byte, []int) { + return file_odpf_assets_v1beta2_model_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Model_Signature) GetInputs() []*Model_Signature_Parameter { + if x != nil { + return x.Inputs + } + return nil +} + +func (x *Model_Signature) GetOutputs() []*Model_Signature_Parameter { + if x != nil { + return x.Outputs + } + return nil +} + +// Specification of name and type of a single column in a dataset. +type Model_Signature_Parameter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional: Name of the input or output parameter. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Data type of the parameter. Ex: boolean, double, numpy's dtypes etc. + DataType string `protobuf:"bytes,2,opt,name=data_type,json=dataType,proto3" json:"data_type,omitempty"` + // Optional: The tensor shape. + Shape []int64 `protobuf:"varint,3,rep,packed,name=shape,proto3" json:"shape,omitempty"` +} + +func (x *Model_Signature_Parameter) Reset() { + *x = Model_Signature_Parameter{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_assets_v1beta2_model_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Model_Signature_Parameter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Model_Signature_Parameter) ProtoMessage() {} + +func (x *Model_Signature_Parameter) ProtoReflect() protoreflect.Message { + mi := &file_odpf_assets_v1beta2_model_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Model_Signature_Parameter.ProtoReflect.Descriptor instead. +func (*Model_Signature_Parameter) Descriptor() ([]byte, []int) { + return file_odpf_assets_v1beta2_model_proto_rawDescGZIP(), []int{0, 0, 0} +} + +func (x *Model_Signature_Parameter) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Model_Signature_Parameter) GetDataType() string { + if x != nil { + return x.DataType + } + return "" +} + +func (x *Model_Signature_Parameter) GetShape() []int64 { + if x != nil { + return x.Shape + } + return nil +} + +var File_odpf_assets_v1beta2_model_proto protoreflect.FileDescriptor + +var file_odpf_assets_v1beta2_model_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x13, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf6, 0x04, 0x0a, 0x05, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, + 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x66, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, + 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, + 0x68, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, + 0x74, 0x68, 0x6d, 0x12, 0x42, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4d, 0x6f, 0x64, + 0x65, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, + 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x66, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0xf1, 0x01, 0x0a, 0x09, 0x53, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x46, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4d, + 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, + 0x12, 0x48, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x1a, 0x52, 0x0a, 0x09, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, + 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x61, 0x70, + 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x05, 0x73, 0x68, 0x61, 0x70, 0x65, 0x42, 0x51, + 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, + 0x42, 0x0a, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x33, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x3b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_odpf_assets_v1beta2_model_proto_rawDescOnce sync.Once + file_odpf_assets_v1beta2_model_proto_rawDescData = file_odpf_assets_v1beta2_model_proto_rawDesc +) + +func file_odpf_assets_v1beta2_model_proto_rawDescGZIP() []byte { + file_odpf_assets_v1beta2_model_proto_rawDescOnce.Do(func() { + file_odpf_assets_v1beta2_model_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_v1beta2_model_proto_rawDescData) + }) + return file_odpf_assets_v1beta2_model_proto_rawDescData +} + +var file_odpf_assets_v1beta2_model_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_odpf_assets_v1beta2_model_proto_goTypes = []interface{}{ + (*Model)(nil), // 0: odpf.assets.v1beta2.Model + (*Model_Signature)(nil), // 1: odpf.assets.v1beta2.Model.Signature + (*Model_Signature_Parameter)(nil), // 2: odpf.assets.v1beta2.Model.Signature.Parameter + (*structpb.Struct)(nil), // 3: google.protobuf.Struct + (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp +} +var file_odpf_assets_v1beta2_model_proto_depIdxs = []int32{ + 1, // 0: odpf.assets.v1beta2.Model.signature:type_name -> odpf.assets.v1beta2.Model.Signature + 3, // 1: odpf.assets.v1beta2.Model.attributes:type_name -> google.protobuf.Struct + 4, // 2: odpf.assets.v1beta2.Model.create_time:type_name -> google.protobuf.Timestamp + 4, // 3: odpf.assets.v1beta2.Model.update_time:type_name -> google.protobuf.Timestamp + 2, // 4: odpf.assets.v1beta2.Model.Signature.inputs:type_name -> odpf.assets.v1beta2.Model.Signature.Parameter + 2, // 5: odpf.assets.v1beta2.Model.Signature.outputs:type_name -> odpf.assets.v1beta2.Model.Signature.Parameter + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_odpf_assets_v1beta2_model_proto_init() } +func file_odpf_assets_v1beta2_model_proto_init() { + if File_odpf_assets_v1beta2_model_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_odpf_assets_v1beta2_model_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Model); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_assets_v1beta2_model_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Model_Signature); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_assets_v1beta2_model_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Model_Signature_Parameter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_odpf_assets_v1beta2_model_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_odpf_assets_v1beta2_model_proto_goTypes, + DependencyIndexes: file_odpf_assets_v1beta2_model_proto_depIdxs, + MessageInfos: file_odpf_assets_v1beta2_model_proto_msgTypes, + }.Build() + File_odpf_assets_v1beta2_model_proto = out.File + file_odpf_assets_v1beta2_model_proto_rawDesc = nil + file_odpf_assets_v1beta2_model_proto_goTypes = nil + file_odpf_assets_v1beta2_model_proto_depIdxs = nil +} diff --git a/plugins/extractors/caramlstore/README.md b/plugins/extractors/caramlstore/README.md index 59210becc..3505072aa 100644 --- a/plugins/extractors/caramlstore/README.md +++ b/plugins/extractors/caramlstore/README.md @@ -28,20 +28,20 @@ source: ## Outputs The feature tables are mapped to an [`Asset`][proton-asset] with model specific -metadata stored using [`MLFeatureTable`][proton-mlfeaturetable]. Please refer +metadata stored using [`FeatureTable`][proton-featuretable]. Please refer the proto definitions for more information. -| Field | Value | Sample Value | -|:-------------------|:----------------------------------------------------------------|:-----------------------------------------------------------------------------| -| `resource.urn` | `urn:caramlstore:{scope}:ml-feature-table:{feature_table_name}` | `urn:caramlstore:caramlstore-stg:ml_feature_table:merchant_uuid_t2_discovery` | -| `resource.name` | `{feature_table.name}` | `merchant_uuid_t2_discovery` | -| `resource.service` | `caramlstore` | `caramlstore` | -| `resource.type` | `ml_feature_table` | `ml_feature_table` | -| `namespace` | `{feature_table.project}` | `my_project` | -| `entities` | [`[]Entity`](#entity) | | -| `features` | [`[]Feature`](#feature) | | -| `create_time` | `{feature_table.created_timestamp}` | `2022-08-08T03:17:54Z` | -| `update_time` | `{feature_table.updated_timestamp}` | `2022-08-08T03:57:54Z` | +| Field | Value | Sample Value | +|:-------------------|:----------------------------------------------------------------|:---------------------------------------------------------------------------| +| `resource.urn` | `urn:caramlstore:{scope}:ml-feature-table:{feature_table_name}` | `urn:caramlstore:caramlstore-stg:feature_table:merchant_uuid_t2_discovery` | +| `resource.name` | `{feature_table.name}` | `merchant_uuid_t2_discovery` | +| `resource.service` | `caramlstore` | `caramlstore` | +| `resource.type` | `feature_table` | `feature_table` | +| `namespace` | `{feature_table.project}` | `my_project` | +| `entities` | [`[]Entity`](#entity) | | +| `features` | [`[]Feature`](#feature) | | +| `create_time` | `{feature_table.created_timestamp}` | `2022-08-08T03:17:54Z` | +| `update_time` | `{feature_table.updated_timestamp}` | `2022-08-08T03:57:54Z` | ### Entity @@ -64,5 +64,5 @@ for information on contributing to this module. [caraml-store]: https://github.com/caraml-dev/caraml-store [coreservice.proto]: https://github.com/caraml-dev/caraml-store/blob/v0.1.1/caraml-store-protobuf/src/main/proto/feast/core/CoreService.proto#L12 -[proton-asset]: https://github.com/odpf/proton/blob/ff960a3/odpf/assets/v1beta2/asset.proto#L14 -[proton-mlfeaturetable]: https://github.com/odpf/proton/blob/ff960a3/odpf/assets/v1beta2/ml_feature.proto#L32 +[proton-asset]: https://github.com/odpf/proton/blob/0acbe8a/odpf/assets/v1beta2/asset.proto#L14 +[proton-featuretable]: https://github.com/odpf/proton/blob/0acbe8a/odpf/assets/v1beta2/feature_table.proto#L32 diff --git a/plugins/extractors/caramlstore/asset_builder.go b/plugins/extractors/caramlstore/asset_builder.go index c7f85311d..36c60e97e 100644 --- a/plugins/extractors/caramlstore/asset_builder.go +++ b/plugins/extractors/caramlstore/asset_builder.go @@ -16,7 +16,7 @@ import ( const ( service = "caramlstore" - typ = "ml_feature_table" + typ = "feature_table" ) type featureTableBuilder struct { @@ -43,7 +43,7 @@ func (b featureTableBuilder) buildAsset(ft *core.FeatureTable) (*v1beta2.Asset, return fail("entities", err) } - featureTable, err := anypb.New(&v1beta2.MLFeatureTable{ + featureTable, err := anypb.New(&v1beta2.FeatureTable{ Namespace: b.project, Entities: entities, Features: b.buildFeatures(ft), @@ -79,8 +79,8 @@ func (b featureTableBuilder) buildLineage(ft *core.FeatureTable) ( return upstreams, nil, nil } -func (b featureTableBuilder) buildEntities(ft *core.FeatureTable) ([]*v1beta2.MLFeatureTable_Entity, error) { - entities := make([]*v1beta2.MLFeatureTable_Entity, 0, len(ft.Spec.Entities)) +func (b featureTableBuilder) buildEntities(ft *core.FeatureTable) ([]*v1beta2.FeatureTable_Entity, error) { + entities := make([]*v1beta2.FeatureTable_Entity, 0, len(ft.Spec.Entities)) for _, e := range ft.Spec.Entities { entity, ok := b.entities[e] if !ok { @@ -95,7 +95,7 @@ func (b featureTableBuilder) buildEntities(ft *core.FeatureTable) ([]*v1beta2.ML labels[k] = v } - entities = append(entities, &v1beta2.MLFeatureTable_Entity{ + entities = append(entities, &v1beta2.FeatureTable_Entity{ Name: entity.Spec.Name, Labels: labels, }) @@ -104,10 +104,10 @@ func (b featureTableBuilder) buildEntities(ft *core.FeatureTable) ([]*v1beta2.ML return entities, nil } -func (b featureTableBuilder) buildFeatures(ft *core.FeatureTable) []*v1beta2.MLFeature { - features := make([]*v1beta2.MLFeature, 0, len(ft.Spec.Features)) +func (b featureTableBuilder) buildFeatures(ft *core.FeatureTable) []*v1beta2.Feature { + features := make([]*v1beta2.Feature, 0, len(ft.Spec.Features)) for _, f := range ft.Spec.Features { - features = append(features, &v1beta2.MLFeature{ + features = append(features, &v1beta2.Feature{ Name: f.Name, DataType: f.ValueType.String(), }) diff --git a/plugins/extractors/caramlstore/testdata/expected-assets.json b/plugins/extractors/caramlstore/testdata/expected-assets.json index 47ad61a5d..da313f5a1 100644 --- a/plugins/extractors/caramlstore/testdata/expected-assets.json +++ b/plugins/extractors/caramlstore/testdata/expected-assets.json @@ -1,11 +1,11 @@ [ { - "urn": "urn:caramlstore:test-caramlstore:ml_feature_table:merchant_uuid_t2_discovery", + "urn": "urn:caramlstore:test-caramlstore:feature_table:merchant_uuid_t2_discovery", "name": "merchant_uuid_t2_discovery", "service": "caramlstore", - "type": "ml_feature_table", + "type": "feature_table", "data": { - "@type": "type.googleapis.com/odpf.assets.v1beta2.MLFeatureTable", + "@type": "type.googleapis.com/odpf.assets.v1beta2.FeatureTable", "namespace": "sauron", "entities": [ { @@ -88,12 +88,12 @@ } }, { - "urn": "urn:caramlstore:test-caramlstore:ml_feature_table:avg_dispatch_arrival_time_10_mins", + "urn": "urn:caramlstore:test-caramlstore:feature_table:avg_dispatch_arrival_time_10_mins", "name": "avg_dispatch_arrival_time_10_mins", "service": "caramlstore", - "type": "ml_feature_table", + "type": "feature_table", "data": { - "@type": "type.googleapis.com/odpf.assets.v1beta2.MLFeatureTable", + "@type": "type.googleapis.com/odpf.assets.v1beta2.FeatureTable", "namespace": "sauron", "entities": [ { @@ -136,12 +136,12 @@ } }, { - "urn": "urn:caramlstore:test-caramlstore:ml_feature_table:merchant_uuid_t2_discovery", + "urn": "urn:caramlstore:test-caramlstore:feature_table:merchant_uuid_t2_discovery", "name": "merchant_uuid_t2_discovery", "service": "caramlstore", - "type": "ml_feature_table", + "type": "feature_table", "data": { - "@type": "type.googleapis.com/odpf.assets.v1beta2.MLFeatureTable", + "@type": "type.googleapis.com/odpf.assets.v1beta2.FeatureTable", "namespace": "food-tensoba", "entities": [ { @@ -224,12 +224,12 @@ } }, { - "urn": "urn:caramlstore:test-caramlstore:ml_feature_table:avg_dispatch_arrival_time_10_mins", + "urn": "urn:caramlstore:test-caramlstore:feature_table:avg_dispatch_arrival_time_10_mins", "name": "avg_dispatch_arrival_time_10_mins", "service": "caramlstore", - "type": "ml_feature_table", + "type": "feature_table", "data": { - "@type": "type.googleapis.com/odpf.assets.v1beta2.MLFeatureTable", + "@type": "type.googleapis.com/odpf.assets.v1beta2.FeatureTable", "namespace": "food-tensoba", "entities": [ {