Skip to content

Commit afc33cf

Browse files
felixwang9817achals
authored andcommitted
Clean up Go feature server test logic
Signed-off-by: Felix Wang <wangfelix98@gmail.com> Signed-off-by: Achal Shah <achals@gmail.com>
1 parent 6a3dd68 commit afc33cf

3 files changed

Lines changed: 4 additions & 48 deletions

File tree

sdk/python/tests/integration/feature_repos/repo_configuration.py

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
IntegrationTestRepoConfig(),
6868
IntegrationTestRepoConfig(python_feature_server=True),
6969
]
70-
7170
if os.getenv("FEAST_IS_LOCAL_TEST", "False") != "True":
7271
DEFAULT_FULL_REPO_CONFIGS.extend(
7372
[
@@ -103,7 +102,6 @@
103102
),
104103
]
105104
)
106-
107105
full_repo_configs_module = os.environ.get(FULL_REPO_CONFIGS_MODULE_ENV_NAME)
108106
if full_repo_configs_module is not None:
109107
try:
@@ -304,25 +302,7 @@ def construct_universal_feature_views(
304302
field_mapping=create_field_mapping_feature_view(data_sources.field_mapping),
305303
)
306304

307-
308-
def construct_universal_feature_views_without_odfv(
309-
data_sources: Dict[str, DataSource],
310-
) -> Dict[str, FeatureView]:
311-
driver_hourly_stats = create_driver_hourly_stats_feature_view(
312-
data_sources["driver"]
313-
)
314-
return {
315-
"customer": create_customer_daily_profile_feature_view(
316-
data_sources["customer"]
317-
),
318-
"global": create_global_stats_feature_view(data_sources["global"]),
319-
"driver": driver_hourly_stats,
320-
"order": create_order_feature_view(data_sources["orders"]),
321-
"location": create_location_stats_feature_view(data_sources["location"]),
322-
"field_mapping": create_field_mapping_feature_view(
323-
data_sources["field_mapping"]
324-
),
325-
}
305+
return universal_feature_views
326306

327307

328308
@dataclass

sdk/python/tests/integration/feature_repos/universal/feature_views.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ def global_feature_view(
3939
)
4040

4141

42-
# return RequestDataSource(
43-
# name="conv_rate_input", schema={"val_to_add": ValueType.INT32}
44-
# )
45-
46-
4742
def conv_rate_plus_100(features_df: pd.DataFrame) -> pd.DataFrame:
4843
df = pd.DataFrame()
4944
df["conv_rate_plus_100"] = features_df["conv_rate"] + 100
@@ -74,24 +69,6 @@ def conv_rate_plus_100_feature_view(
7469
)
7570

7671

77-
def conv_rate_plus_100_feature_view_without_odfv(
78-
inputs: Dict[str, Union[RequestDataSource, FeatureView]],
79-
infer_features: bool = False,
80-
features: Optional[List[Feature]] = None,
81-
) -> OnDemandFeatureView:
82-
_features = features or [
83-
Feature("conv_rate_plus_100", ValueType.DOUBLE),
84-
Feature("conv_rate_plus_val_to_add", ValueType.DOUBLE),
85-
Feature("conv_rate_plus_100_rounded", ValueType.INT32),
86-
]
87-
return OnDemandFeatureView(
88-
name=conv_rate_plus_100.__name__,
89-
inputs=inputs,
90-
features=[] if infer_features else _features,
91-
udf=conv_rate_plus_100,
92-
)
93-
94-
9572
def similarity(features_df: pd.DataFrame) -> pd.DataFrame:
9673
if features_df.size == 0:
9774
# give hint to Feast about return type

sdk/python/tests/integration/online_store/test_universal_online.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from tests.integration.feature_repos.repo_configuration import (
2323
Environment,
2424
construct_universal_feature_views,
25-
construct_universal_feature_views_without_odfv,
2625
)
2726
from tests.integration.feature_repos.universal.entities import (
2827
customer,
@@ -658,7 +657,7 @@ def test_online_retrieval_without_odfv(
658657
):
659658
fs = environment.feature_store
660659
entities, datasets, data_sources = universal_data_sources
661-
feature_views = construct_universal_feature_views_without_odfv(data_sources)
660+
feature_views = construct_universal_feature_views(data_sources, with_odfv=False)
662661

663662
feature_service_entity_mapping = FeatureService(
664663
name="entity_mapping",
@@ -825,7 +824,7 @@ def test_online_retrieval_without_odfv(
825824
@pytest.mark.integration
826825
@pytest.mark.universal
827826
@pytest.mark.noodfv
828-
def test_online_store_cleanup_go_server(environment, universal_data_sources):
827+
def test_online_store_cleanup_without_odfv(environment, universal_data_sources):
829828
"""
830829
Some online store implementations (like Redis) keep features from different features views
831830
but with common entities together.
@@ -843,7 +842,7 @@ def test_online_store_cleanup_go_server(environment, universal_data_sources):
843842
"""
844843
fs = environment.feature_store
845844
entities, datasets, data_sources = universal_data_sources
846-
driver_stats_fv = construct_universal_feature_views_without_odfv(data_sources)[
845+
driver_stats_fv = construct_universal_feature_views(data_sources, with_odfv=False)[
847846
"driver"
848847
]
849848

0 commit comments

Comments
 (0)