You train a model with features looked up from a feature table and want scoring to fetch the same features automatically. What should you do?
- Exam domain
- Databricks Machine Learning36% of the exam
- Difficulty
- Hard
- In this mock
- 18 questions on this domainPractise this domain
Why the exam asks this
Databricks Machine Learning (36% of the exam)
Objective in the exam guide: Train a model with features from a feature store table
Training with features from a feature table is named.
Why C is the answer
Use create_training_set with FeatureLookup, then fe.log_model
create_training_set records which features the model uses. Logging with fe.log_model packages that lineage, so scoring can look up the features by key.
Remember: Log feature-aware models with fe.log_model.
How it works
Feature-aware model logging stores lookup metadata.
In detail
- FeatureLookup plus create_training_set.
- fe.log_model keeps lookup metadata.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Join the features by hand and log the model with mlflow.sklearn.log_modelWrongMost tempting
Plain logging loses feature lineage.
Why it tempts: It trains fine, but scoring loses the lookups.
B. Save the feature table name in a notebook commentWrong
Comments are not metadata.
C. Use create_training_set with FeatureLookup, then fe.log_modelRight
Log feature-aware models with fe.log_model.
D. Copy the features into the model fileWrong
Embedding features breaks freshness.
Use case
An illustrative scenario, not a real incident.
Illustrative: a churn model is logged with fe.log_model, so batch scoring only needs customer_id.
See it in different ways
sequenceDiagram participant P0 as Labels DataFrame participant P1 as FeatureEngineeringClient participant P2 as MLflow P0->>P1: create_training_set with FeatureLookup P1->>P2: fe.log_model with training_set
How to read this chart
- 1. Labels DataFrame sends "create_training_set with FeatureLookup" to FeatureEngineeringClient.
- 2. FeatureEngineeringClient sends "fe.log_model with training_set" to MLflow.
flowchart LR S0["FeatureLookup"] --> S1["create_training_set"] --> S2["load_df"] --> S3["Train"] --> S4["fe.log_model"]
How to read this chart
- Read it in order: FeatureLookup, then create_training_set, then load_df, then Train, then fe.log_model.