@@ -288,6 +288,7 @@ def _get_online_features_dict_remotely(
288
288
289
289
def get_online_features_dict (
290
290
environment : Environment ,
291
+ endpoint : str ,
291
292
features : Union [List [str ], FeatureService ],
292
293
entity_rows : List [Dict [str , Any ]],
293
294
full_feature_names : bool = False ,
@@ -305,7 +306,6 @@ def get_online_features_dict(
305
306
assertpy .assert_that (online_features ).is_not_none ()
306
307
dict1 = online_features .to_dict ()
307
308
308
- endpoint = environment .get_feature_server_endpoint ()
309
309
# If endpoint is None, it means that a local / remote feature server aren't configured
310
310
if endpoint is not None :
311
311
dict2 = _get_online_features_dict_remotely (
@@ -447,7 +447,7 @@ def test_online_retrieval_with_event_timestamps(
447
447
@pytest .mark .goserver
448
448
@pytest .mark .parametrize ("full_feature_names" , [True , False ], ids = lambda v : str (v ))
449
449
def test_online_retrieval (
450
- environment , universal_data_sources , python_server , full_feature_names
450
+ environment , universal_data_sources , feature_server_endpoint , full_feature_names
451
451
):
452
452
fs = environment .feature_store
453
453
entities , datasets , data_sources = universal_data_sources
@@ -547,6 +547,7 @@ def test_online_retrieval(
547
547
548
548
online_features_dict = get_online_features_dict (
549
549
environment = environment ,
550
+ endpoint = feature_server_endpoint ,
550
551
features = feature_refs ,
551
552
entity_rows = entity_rows ,
552
553
full_feature_names = full_feature_names ,
@@ -556,6 +557,7 @@ def test_online_retrieval(
556
557
# feature isn't requested.
557
558
online_features_no_conv_rate = get_online_features_dict (
558
559
environment = environment ,
560
+ endpoint = feature_server_endpoint ,
559
561
features = [ref for ref in feature_refs if ref != "driver_stats:conv_rate" ],
560
562
entity_rows = entity_rows ,
561
563
full_feature_names = full_feature_names ,
@@ -616,6 +618,7 @@ def test_online_retrieval(
616
618
# Check what happens for missing values
617
619
missing_responses_dict = get_online_features_dict (
618
620
environment = environment ,
621
+ endpoint = feature_server_endpoint ,
619
622
features = feature_refs ,
620
623
entity_rows = [{"driver_id" : 0 , "customer_id" : 0 , "val_to_add" : 100 }],
621
624
full_feature_names = full_feature_names ,
@@ -635,13 +638,15 @@ def test_online_retrieval(
635
638
with pytest .raises (RequestDataNotFoundInEntityRowsException ):
636
639
get_online_features_dict (
637
640
environment = environment ,
641
+ endpoint = feature_server_endpoint ,
638
642
features = feature_refs ,
639
643
entity_rows = [{"driver_id" : 0 , "customer_id" : 0 }],
640
644
full_feature_names = full_feature_names ,
641
645
)
642
646
643
647
assert_feature_service_correctness (
644
648
environment ,
649
+ feature_server_endpoint ,
645
650
feature_service ,
646
651
entity_rows ,
647
652
full_feature_names ,
@@ -659,6 +664,7 @@ def test_online_retrieval(
659
664
]
660
665
assert_feature_service_entity_mapping_correctness (
661
666
environment ,
667
+ feature_server_endpoint ,
662
668
feature_service_entity_mapping ,
663
669
entity_rows ,
664
670
full_feature_names ,
@@ -856,6 +862,7 @@ def get_latest_feature_values_for_location_df(entity_row, origin_df, destination
856
862
857
863
def assert_feature_service_correctness (
858
864
environment ,
865
+ endpoint ,
859
866
feature_service ,
860
867
entity_rows ,
861
868
full_feature_names ,
@@ -866,6 +873,7 @@ def assert_feature_service_correctness(
866
873
):
867
874
feature_service_online_features_dict = get_online_features_dict (
868
875
environment = environment ,
876
+ endpoint = endpoint ,
869
877
features = feature_service ,
870
878
entity_rows = entity_rows ,
871
879
full_feature_names = full_feature_names ,
@@ -905,6 +913,7 @@ def assert_feature_service_correctness(
905
913
906
914
def assert_feature_service_entity_mapping_correctness (
907
915
environment ,
916
+ endpoint ,
908
917
feature_service ,
909
918
entity_rows ,
910
919
full_feature_names ,
@@ -914,6 +923,7 @@ def assert_feature_service_entity_mapping_correctness(
914
923
if full_feature_names :
915
924
feature_service_online_features_dict = get_online_features_dict (
916
925
environment = environment ,
926
+ endpoint = endpoint ,
917
927
features = feature_service ,
918
928
entity_rows = entity_rows ,
919
929
full_feature_names = full_feature_names ,
@@ -948,6 +958,7 @@ def assert_feature_service_entity_mapping_correctness(
948
958
with pytest .raises (FeatureNameCollisionError ):
949
959
get_online_features_dict (
950
960
environment = environment ,
961
+ endpoint = endpoint ,
951
962
features = feature_service ,
952
963
entity_rows = entity_rows ,
953
964
full_feature_names = full_feature_names ,
0 commit comments