Complete the code to import the Feast client.
from feast import [1]
The FeatureStore class is used to interact with Feast feature stores.
Complete the code to initialize the Feast feature store client.
store = FeatureStore(repo_path=[1])The repo_path parameter expects a string path to the feature store repository.
Fix the error in the code to retrieve features from Feast.
features = store.get_online_features(feature_refs=[1], entity_rows=entity_rows).to_dict()The feature_refs parameter expects a single string with comma-separated feature references.
Fill both blanks to define an entity row and retrieve features.
entity_rows = [{ '[1]': 1001 }]
features = store.get_online_features(feature_refs='driver:[2]', entity_rows=entity_rows).to_dict()The entity row dictionary key should be the entity name driver_id. The feature reference is driver:rating.
Fill all three blanks to create a feature view and register it.
from feast import Feature, [1], ValueType features = [Feature(name='[2]', dtype=ValueType.FLOAT)] feature_view = [3]( name='driver_stats', entities=['driver_id'], features=features, ttl=None ) store.apply([feature_view])
The class to create a feature view is FeatureView. The feature name is trip_duration. We use FeatureView to create the feature view instance.