Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove tfx schema from ValueType #2098

Merged
merged 1 commit into from
Dec 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions sdk/python/feast/value_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
# limitations under the License.
import enum

from tensorflow_metadata.proto.v0 import schema_pb2


class ValueType(enum.Enum):
"""
Expand All @@ -39,29 +37,3 @@ class ValueType(enum.Enum):
BOOL_LIST = 17
UNIX_TIMESTAMP_LIST = 18
NULL = 19

def to_tfx_schema_feature_type(self):
if self.value in [
ValueType.BYTES.value,
ValueType.STRING.value,
ValueType.BOOL.value,
ValueType.BYTES_LIST.value,
ValueType.STRING_LIST.value,
ValueType.INT32_LIST.value,
ValueType.INT64_LIST.value,
ValueType.DOUBLE_LIST.value,
ValueType.FLOAT_LIST.value,
ValueType.BOOL_LIST.value,
ValueType.UNIX_TIMESTAMP_LIST.value,
]:
return schema_pb2.FeatureType.BYTES
elif self.value in [
ValueType.INT32.value,
ValueType.INT64.value,
ValueType.UNIX_TIMESTAMP.value,
]:
return schema_pb2.FeatureType.INT
elif self.value in [ValueType.DOUBLE.value, ValueType.FLOAT.value]:
return schema_pb2.FeatureType.FLOAT
else:
return schema_pb2.FeatureType.TYPE_UNKNOWN