@@ -118,7 +118,9 @@ class FeatureStore:
118118
119119 @log_exceptions
120120 def __init__ (
121- self , repo_path : Optional [str ] = None , config : Optional [RepoConfig ] = None ,
121+ self ,
122+ repo_path : Optional [str ] = None ,
123+ config : Optional [RepoConfig ] = None ,
122124 ):
123125 """
124126 Creates a FeatureStore object.
@@ -253,7 +255,9 @@ def list_request_feature_views(
253255 )
254256
255257 def _list_feature_views (
256- self , allow_cache : bool = False , hide_dummy_entity : bool = True ,
258+ self ,
259+ allow_cache : bool = False ,
260+ hide_dummy_entity : bool = True ,
257261 ) -> List [FeatureView ]:
258262 feature_views = []
259263 for fv in self ._registry .list_feature_views (
@@ -266,7 +270,9 @@ def _list_feature_views(
266270 return feature_views
267271
268272 def _list_stream_feature_views (
269- self , allow_cache : bool = False , hide_dummy_entity : bool = True ,
273+ self ,
274+ allow_cache : bool = False ,
275+ hide_dummy_entity : bool = True ,
270276 ) -> List [StreamFeatureView ]:
271277 stream_feature_views = []
272278 for sfv in self ._registry .list_stream_feature_views (
@@ -480,7 +486,9 @@ def delete_feature_service(self, name: str):
480486 return self ._registry .delete_feature_service (name , self .project )
481487
482488 def _get_features (
483- self , features : Union [List [str ], FeatureService ], allow_cache : bool = False ,
489+ self ,
490+ features : Union [List [str ], FeatureService ],
491+ allow_cache : bool = False ,
484492 ) -> List [str ]:
485493 _features = features
486494
@@ -589,7 +597,8 @@ def _make_inferences(
589597 feature_service .infer_features (fvs_to_update = fvs_to_update_map )
590598
591599 def _get_feature_views_to_materialize (
592- self , feature_views : Optional [List [str ]],
600+ self ,
601+ feature_views : Optional [List [str ]],
593602 ) -> List [FeatureView ]:
594603 """
595604 Returns the list of feature views that should be materialized.
@@ -1069,7 +1078,8 @@ def get_historical_features(
10691078 for feature_name in odfv_request_data_schema .keys ():
10701079 if feature_name not in entity_df .columns :
10711080 raise RequestDataNotFoundInEntityDfException (
1072- feature_name = feature_name , feature_view_name = odfv .name ,
1081+ feature_name = feature_name ,
1082+ feature_view_name = odfv .name ,
10731083 )
10741084
10751085 _validate_feature_refs (_feature_refs , full_feature_names )
@@ -1182,7 +1192,9 @@ def get_saved_dataset(self, name: str) -> SavedDataset:
11821192
11831193 @log_exceptions_and_usage
11841194 def materialize_incremental (
1185- self , end_date : datetime , feature_views : Optional [List [str ]] = None ,
1195+ self ,
1196+ end_date : datetime ,
1197+ feature_views : Optional [List [str ]] = None ,
11861198 ) -> None :
11871199 """
11881200 Materialize incremental new data from the offline store into the online store.
@@ -1264,7 +1276,10 @@ def tqdm_builder(length):
12641276 )
12651277
12661278 self ._registry .apply_materialization (
1267- feature_view , self .project , start_date , end_date ,
1279+ feature_view ,
1280+ self .project ,
1281+ start_date ,
1282+ end_date ,
12681283 )
12691284
12701285 @log_exceptions_and_usage
@@ -1336,7 +1351,10 @@ def tqdm_builder(length):
13361351 )
13371352
13381353 self ._registry .apply_materialization (
1339- feature_view , self .project , start_date , end_date ,
1354+ feature_view ,
1355+ self .project ,
1356+ start_date ,
1357+ end_date ,
13401358 )
13411359
13421360 @log_exceptions_and_usage
@@ -1439,8 +1457,8 @@ def write_to_offline_store(
14391457 )
14401458
14411459 # Get columns of the batch source and the input dataframe.
1442- column_names_and_types = feature_view . batch_source . get_table_column_names_and_types (
1443- self .config
1460+ column_names_and_types = (
1461+ feature_view . batch_source . get_table_column_names_and_types ( self .config )
14441462 )
14451463 source_columns = [column for column , _ in column_names_and_types ]
14461464 input_columns = df .columns .values .tolist ()
@@ -1701,12 +1719,17 @@ def _get_online_features(
17011719 for table , requested_features in grouped_refs :
17021720 # Get the correct set of entity values with the correct join keys.
17031721 table_entity_values , idxs = self ._get_unique_entities (
1704- table , join_key_values , entity_name_to_join_key_map ,
1722+ table ,
1723+ join_key_values ,
1724+ entity_name_to_join_key_map ,
17051725 )
17061726
17071727 # Fetch feature data for the minimum set of Entities.
17081728 feature_data = self ._read_from_online_store (
1709- table_entity_values , provider , requested_features , table ,
1729+ table_entity_values ,
1730+ provider ,
1731+ requested_features ,
1732+ table ,
17101733 )
17111734
17121735 # Populate the result_rows with the Features from the OnlineStore inplace.
@@ -1875,7 +1898,9 @@ def _get_unique_entities(
18751898 """
18761899 # Get the correct set of entity values with the correct join keys.
18771900 table_entity_values = self ._get_table_entity_values (
1878- table , entity_name_to_join_key_map , join_key_values ,
1901+ table ,
1902+ entity_name_to_join_key_map ,
1903+ join_key_values ,
18791904 )
18801905
18811906 # Convert back to rowise.
@@ -2060,7 +2085,8 @@ def _augment_response_with_on_demand_transforms(
20602085 for odfv_name , _feature_refs in odfv_feature_refs .items ():
20612086 odfv = requested_odfv_map [odfv_name ]
20622087 transformed_features_df = odfv .get_transformed_features_df (
2063- initial_response_df , full_feature_names ,
2088+ initial_response_df ,
2089+ full_feature_names ,
20642090 )
20652091 selected_subset = [
20662092 f for f in transformed_features_df .columns if f in _feature_refs
@@ -2117,9 +2143,7 @@ def _get_feature_views_to_use(
21172143 features : Optional [Union [List [str ], FeatureService ]],
21182144 allow_cache = False ,
21192145 hide_dummy_entity : bool = True ,
2120- ) -> Tuple [
2121- List [FeatureView ], List [RequestFeatureView ], List [OnDemandFeatureView ],
2122- ]:
2146+ ) -> Tuple [List [FeatureView ], List [RequestFeatureView ], List [OnDemandFeatureView ]]:
21232147
21242148 fvs = {
21252149 fv .name : fv
@@ -2364,10 +2388,10 @@ def get_validation_reference(
23642388 self , name : str , allow_cache : bool = False
23652389 ) -> ValidationReference :
23662390 """
2367- Retrieves a validation reference.
2391+ Retrieves a validation reference.
23682392
2369- Raises:
2370- ValidationReferenceNotFoundException: The validation reference could not be found.
2393+ Raises:
2394+ ValidationReferenceNotFoundException: The validation reference could not be found.
23712395 """
23722396 ref = self ._registry .get_validation_reference (
23732397 name , project = self .project , allow_cache = allow_cache
0 commit comments