Repository navigation
Expand file tree
/
Copy pathFeatureSet.proto
More file actions
178 lines (153 loc) · 7.02 KB
/
Copy pathFeatureSet.proto
File metadata and controls
178 lines (153 loc) · 7.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
//
// * Copyright 2019 The Feast Authors
// *
// * Licensed under the Apache License, Version 2.0 (the "License");
// * you may not use this file except in compliance with the License.
// * You may obtain a copy of the License at
// *
// * https://www.apache.org/licenses/LICENSE-2.0
// *
// * Unless required by applicable law or agreed to in writing, software
// * distributed under the License is distributed on an "AS IS" BASIS,
// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// * See the License for the specific language governing permissions and
// * limitations under the License.
//
syntax = "proto3";
package feast.core;
option java_package = "feast.core";
option java_outer_classname = "FeatureSetProto";
option go_package = "github.com/gojek/feast/sdk/go/protos/feast/core";
import "feast/types/Value.proto";
import "feast/core/Source.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "tensorflow_metadata/proto/v0/schema.proto";
message FeatureSet {
// User-specified specifications of this feature set.
FeatureSetSpec spec = 1;
// System-populated metadata for this feature set.
FeatureSetMeta meta = 2;
}
message FeatureSetSpec {
// Name of project that this feature set belongs to.
string project = 7;
// Name of the feature set. Must be unique.
string name = 1;
// Feature set version.
int32 version = 2;
// List of entities contained within this featureSet.
// This allows the feature to be used during joins between feature sets.
// If the featureSet is ingested into a store that supports keys, this value
// will be made a key.
repeated EntitySpec entities = 3;
// List of features contained within this featureSet.
repeated FeatureSpec features = 4;
// Features in this feature set will only be retrieved if they are found
// after [time - max_age]. Missing or older feature values will be returned
// as nulls and indicated to end user
google.protobuf.Duration max_age = 5;
// Optional. Source on which feature rows can be found.
// If not set, source will be set to the default value configured in Feast Core.
Source source = 6;
}
message EntitySpec {
// Name of the entity.
string name = 1;
// Value type of the feature.
feast.types.ValueType.Enum value_type = 2;
// presence_constraints, shape_type and domain_info are referenced from:
// https://github.com/tensorflow/metadata/blob/36f65d1268cbc92cdbcf812ee03dcf47fb53b91e/tensorflow_metadata/proto/v0/schema.proto#L107
oneof presence_constraints {
// Constraints on the presence of this feature in the examples.
tensorflow.metadata.v0.FeaturePresence presence = 3;
// Only used in the context of a "group" context, e.g., inside a sequence.
tensorflow.metadata.v0.FeaturePresenceWithinGroup group_presence = 4;
}
// The shape of the feature which governs the number of values that appear in
// each example.
oneof shape_type {
// The feature has a fixed shape corresponding to a multi-dimensional
// tensor.
tensorflow.metadata.v0.FixedShape shape = 5;
// The feature doesn't have a well defined shape. All we know are limits on
// the minimum and maximum number of values.
tensorflow.metadata.v0.ValueCount value_count = 6;
}
// Domain for the values of the feature.
oneof domain_info {
// Reference to a domain defined at the schema level.
string domain = 7;
// Inline definitions of domains.
tensorflow.metadata.v0.IntDomain int_domain = 8;
tensorflow.metadata.v0.FloatDomain float_domain = 9;
tensorflow.metadata.v0.StringDomain string_domain = 10;
tensorflow.metadata.v0.BoolDomain bool_domain = 11;
tensorflow.metadata.v0.StructDomain struct_domain = 12;
// Supported semantic domains.
tensorflow.metadata.v0.NaturalLanguageDomain natural_language_domain = 13;
tensorflow.metadata.v0.ImageDomain image_domain = 14;
tensorflow.metadata.v0.MIDDomain mid_domain = 15;
tensorflow.metadata.v0.URLDomain url_domain = 16;
tensorflow.metadata.v0.TimeDomain time_domain = 17;
tensorflow.metadata.v0.TimeOfDayDomain time_of_day_domain = 18;
}
}
message FeatureSpec {
// Name of the feature.
string name = 1;
// Value type of the feature.
feast.types.ValueType.Enum value_type = 2;
// presence_constraints, shape_type and domain_info are referenced from:
// https://github.com/tensorflow/metadata/blob/36f65d1268cbc92cdbcf812ee03dcf47fb53b91e/tensorflow_metadata/proto/v0/schema.proto#L107
oneof presence_constraints {
// Constraints on the presence of this feature in the examples.
tensorflow.metadata.v0.FeaturePresence presence = 3;
// Only used in the context of a "group" context, e.g., inside a sequence.
tensorflow.metadata.v0.FeaturePresenceWithinGroup group_presence = 4;
}
// The shape of the feature which governs the number of values that appear in
// each example.
oneof shape_type {
// The feature has a fixed shape corresponding to a multi-dimensional
// tensor.
tensorflow.metadata.v0.FixedShape shape = 5;
// The feature doesn't have a well defined shape. All we know are limits on
// the minimum and maximum number of values.
tensorflow.metadata.v0.ValueCount value_count = 6;
}
// Domain for the values of the feature.
oneof domain_info {
// Reference to a domain defined at the schema level.
string domain = 7;
// Inline definitions of domains.
tensorflow.metadata.v0.IntDomain int_domain = 8;
tensorflow.metadata.v0.FloatDomain float_domain = 9;
tensorflow.metadata.v0.StringDomain string_domain = 10;
tensorflow.metadata.v0.BoolDomain bool_domain = 11;
tensorflow.metadata.v0.StructDomain struct_domain = 12;
// Supported semantic domains.
tensorflow.metadata.v0.NaturalLanguageDomain natural_language_domain = 13;
tensorflow.metadata.v0.ImageDomain image_domain = 14;
tensorflow.metadata.v0.MIDDomain mid_domain = 15;
tensorflow.metadata.v0.URLDomain url_domain = 16;
tensorflow.metadata.v0.TimeDomain time_domain = 17;
tensorflow.metadata.v0.TimeOfDayDomain time_of_day_domain = 18;
}
}
message FeatureSetMeta {
// Created timestamp of this specific feature set.
google.protobuf.Timestamp created_timestamp = 1;
// Status of the feature set.
// Used to indicate whether the feature set is ready for consumption or ingestion.
// Currently supports 2 states:
// 1) STATUS_PENDING - A feature set is in pending state if Feast has not spun up the jobs
// necessary to push rows for this feature set to stores subscribing to this feature set.
// 2) STATUS_READY - Feature set is ready for consumption or ingestion
FeatureSetStatus status = 2;
}
enum FeatureSetStatus {
STATUS_INVALID = 0;
STATUS_PENDING = 1;
STATUS_READY = 2;
}