Databricks Machine Learning Associate Question 85
Select 3You are working on a machine learning project in Databricks to predict customer churn. The relevant features are stored in a Delta table registered as a Feature Store table named 'customer_features'. You need to train a model using these features. Which of the following steps are required to train the model while ensuring the feature lineage is maintained?
- A
Use the Feature Store library to load the features into a DataFrame.
- B
Directly query the Delta table using Spark SQL to retrieve the features.
- C
Create a training set using the
feature_store.create_training_setmethod. - D
Log the model using the Feature Store API after training.
- E
Use the
spark.read.format('delta').loadmethod to load the features for training.
Show answer and explanation
Correct answers: A, C, D
Explanation
To train a model with features from a Feature Store table in Databricks, it is essential to utilize the Feature Store library to ensure feature lineage is maintained. The process involves loading the features using the Feature Store library, creating a training set with the feature_store.create_training_set method, and logging the trained model with the Feature Store API to maintain feature dependencies. Directly querying the Delta table or loading it using Spark's Delta API bypasses the Feature Store's capabilities and should be avoided in this scenario.
- A. Correct.
Correct. Using the Feature Store library is necessary to ensure the features are retrieved with lineage information, which is a key advantage of the Feature Store.
- B. Incorrect.
Incorrect. While you can query the Delta table directly using Spark SQL, this approach does not maintain feature lineage information, which is critical for reproducibility and tracking.
- C. Correct.
Correct. The
feature_store.create_training_setmethod is required to prepare the training data while maintaining metadata and lineage from the Feature Store. - D. Correct.
Correct. Logging the model using the Feature Store API ensures that the model's dependencies on the features are tracked, enabling reproducibility.
- E. Incorrect.
Incorrect. Loading the Delta table using
spark.read.format('delta').loadretrieves the data but does not leverage the Feature Store's capabilities for tracking lineage and metadata.