QuestionQ59

VerifiedValidation Testing

A Machine Learning Engineer plans to deploy a new change to the existing model-training pipeline for a social media app. Currently, they use the Databricks Feature Store to create a training set for training their LightGBM model, which is then used in a Pandas UDF for batch inference to recommend potential friends to users. They updated the feature-engineering pipeline to include an additional feature function that computes the number of mutual friends a user has.

Which test should they add to quickly determine whether something has broken in the test environment?

Explanation

A unit test with a fake, controlled dataset directly validates the new mutual-friends feature function against known expected values. It is fast, deterministic, and isolates failures in the changed code. Databricks recommends unit tests for self-contained code units such as functions because they find problems early; full-pipeline integration tests validate components working together and are more extensive.

Learn more

Community Discussion

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