QuestionQ36

Advanced Feature Store Concepts

A machine learning engineer developed a model and registered it by using the FeatureStoreClient fs. The model has model URI model_uri. The engineer must now run batch inference on the customer-level Spark DataFrame spark_df, but it lacks several static features that were used to train the model. The customer_id column is the primary key of spark_df and of the training set used to train and log the model.

Which code block can compute predictions for spark_df when the missing feature values can be located in the Feature Store by searching for features using customer_id?

  • A df = fs.get_missing_features(spark_df, model_uri)fs.score_model(model_uri, df)
  • B fs.score_model(model_uri, spark_df)
  • C df = fs.get_missing_features(spark_df, model_uri)fs.score_batch(model_uri, df)
  • D df = fs.get_missing_features(spark_df)fs.score_batch(model_uri, df)
  • E fs.score_batch(model_uri, spark_df)
Explanation

FeatureStoreClient.score_batch(model_uri, spark_df) performs offline batch inference and automatically joins Feature Store features to the supplied Spark DataFrame using the feature metadata packaged when the model was logged. The input must include the feature lookup key; customer_id satisfies that requirement, so missing static feature values are retrieved before scoring. Databricks: Train models with feature tables

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!