0
0
MLOpsdevops~10 mins

Feast feature store basics in MLOps - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to import the Feast client.

MLOps
from feast import [1]
Drag options to blanks, or click blank then click option'
AFeatureStore
BClient
CFeature
DStore
Attempts:
3 left
💡 Hint
Common Mistakes
Importing Client instead of FeatureStore
Using Store which is not a valid class
2fill in blank
medium

Complete the code to initialize the Feast feature store client.

MLOps
store = FeatureStore(repo_path=[1])
Drag options to blanks, or click blank then click option'
Arepo_path
BFeatureStore
C'/path/to/repo'
Dclient
Attempts:
3 left
💡 Hint
Common Mistakes
Passing variable names instead of string path
Omitting quotes around the path
3fill in blank
hard

Fix the error in the code to retrieve features from Feast.

MLOps
features = store.get_online_features(feature_refs=[1], entity_rows=entity_rows).to_dict()
Drag options to blanks, or click blank then click option'
A'driver.feature1,driver.feature2'
B'driver:feature1,driver:feature2'
Cdriver:feature1,driver:feature2
D['driver:feature1', 'driver:feature2']
Attempts:
3 left
💡 Hint
Common Mistakes
Passing a list instead of a string
Using dot instead of colon in feature references
4fill in blank
hard

Fill both blanks to define an entity row and retrieve features.

MLOps
entity_rows = [{ '[1]': 1001 }]
features = store.get_online_features(feature_refs='driver:[2]', entity_rows=entity_rows).to_dict()
Drag options to blanks, or click blank then click option'
Adriver_id
Brating
Ctrip_count
Ddriver
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'driver' instead of 'driver_id' as key
Using wrong feature name in feature_refs
5fill in blank
hard

Fill all three blanks to create a feature view and register it.

MLOps
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])
Drag options to blanks, or click blank then click option'
AFeatureView
Btrip_duration
CDriverStatsView
DFeatureStore
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong class name for feature view
Using incorrect feature names
Confusing FeatureStore with FeatureView