Skip to content

Commit f27ed49

Browse files
committed
Fix test
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
1 parent b9ae6d3 commit f27ed49

4 files changed

Lines changed: 9 additions & 11 deletions

File tree

go/internal/test/feature_repo/example.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
from google.protobuf.duration_pb2 import Duration
44

5-
from feast import Entity, Feature, FeatureView, FileSource, ValueType, FeatureService
5+
from feast import Entity, Feature, FeatureView, Field, FileSource, FeatureService
66
from feast.feature_logging import LoggingConfig
77
from feast.infra.offline_stores.file_source import FileLoggingDestination
8+
from feast.types import Float32, Int64
89

910
# Read data from parquet files. Parquet is convenient for local development mode. For
1011
# production, you can use your favorite DWH, such as BigQuery. See Feast documentation
@@ -17,7 +18,7 @@
1718

1819
# Define an entity for the driver. You can think of entity as a primary key used to
1920
# fetch features.
20-
driver = Entity(name="driver_id", value_type=ValueType.INT64, description="driver id",)
21+
driver = Entity(name="driver_id", description="driver id")
2122

2223
# Our parquet files contain sample data that includes a driver_id column, timestamps and
2324
# three feature column. Here we define a Feature View that will allow us to serve this
@@ -27,9 +28,9 @@
2728
entities=["driver_id"],
2829
ttl=Duration(seconds=86400 * 365 * 10),
2930
features=[
30-
Feature(name="conv_rate", dtype=ValueType.FLOAT),
31-
Feature(name="acc_rate", dtype=ValueType.FLOAT),
32-
Feature(name="avg_daily_trips", dtype=ValueType.INT64),
31+
Field(name="conv_rate", dtype=Float32),
32+
Field(name="acc_rate", dtype=Float32),
33+
Field(name="avg_daily_trips", dtype=Int64),
3334
],
3435
online=True,
3536
batch_source=driver_hourly_stats,

java/serving/src/test/resources/docker-compose/feast10/definitions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def transformed_conv_rate(features_df: pd.DataFrame) -> pd.DataFrame:
7171
path="benchmark_data.parquet", timestamp_field="event_timestamp",
7272
)
7373

74-
entity = Entity(name="entity", value_type=ValueType.STRING,)
74+
entity = Entity(name="entity")
7575

7676
benchmark_feature_views = [
7777
FeatureView(

sdk/python/tests/integration/materialization/test_lambda.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ def test_lambda_materialization_consistency():
4545
fs = lambda_environment.feature_store
4646
driver = Entity(
4747
name="driver_id",
48-
join_key="driver_id",
49-
value_type=ValueType.INT64,
48+
join_keys=["driver_id"],
5049
)
5150

5251
driver_stats_fv = FeatureView(

ui/feature_repo/features.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22

33
import pandas as pd
44

5-
from feast import Entity, FeatureService, FeatureView, Field, FileSource, ValueType
5+
from feast import Entity, FeatureService, FeatureView, Field, FileSource
66
from feast.data_source import RequestSource
77
from feast.on_demand_feature_view import on_demand_feature_view
88
from feast.types import Bool, Int64, String
99

1010
zipcode = Entity(
1111
name="zipcode",
12-
value_type=ValueType.INT64,
1312
description="A zipcode",
1413
tags={"owner": "danny@tecton.ai", "team": "hack week",},
1514
)
@@ -82,7 +81,6 @@
8281

8382
dob_ssn = Entity(
8483
name="dob_ssn",
85-
value_type=ValueType.STRING,
8684
description="Date of birth and last four digits of social security number",
8785
tags={"owner": "tony@tecton.ai", "team": "hack week",},
8886
)

0 commit comments

Comments
 (0)