[2026] Databricks-Machine-Learning-Professional by ML Data Scientist Actual Free Exam Practice Test
Free ML Data Scientist Databricks-Machine-Learning-Professional Exam Question
Databricks Databricks-Machine-Learning-Professional Exam Syllabus Topics:
| Topic | Details |
|---|---|
| Topic 1 |
|
| Topic 2 |
|
| Topic 3 |
|
| Topic 4 |
|
| Topic 5 |
|
| Topic 6 |
|
NEW QUESTION # 75
A Machine Learning Engineer wants to use on-demand features to train a model. They have a Python UDF, which relies on data fetched from a FeatureLookup. However, in online serving, the pipeline falls when the lookup ID is not found. Which solution will resolve this issue?
- A. Register the UDF to Unity Catalog, so None values are handled automatically.
- B. Add a default ID when defining the FeatureLookup, so it does not return None values.
- C. Log the model correctly via the FeatureEngineeringClient, so it automatically evaluates on- demand features.
- D. Update the UDF so that it handles both NaNs and None values.
Answer: D
Explanation:
When an on-demand feature relies on a FeatureLookup, missing lookup keys can result in None values during online serving. Updating the Python UDF to explicitly handle None and NaN values ensures the feature computation is robust to missing lookups, preventing runtime failures while preserving correct behavior during both training and online inference.
NEW QUESTION # 76
A data scientist has developed and logged a scikit-learn random forest model model, and then they ended their Spark session and terminated their cluster. After starting a new cluster, they want to review the feature_importances_ of the original model object.
Which of the following lines of code can be used to restore the model object so that feature_importances_ is available?
- A. This can only be viewed in the MLflow Experiments UI
- B. client.pyfunc.load_model(model_uri)
- C. client.list_artifacts(run_id)["feature-importances.csv"]
- D. mlflow.load_model(model_uri)
- E. mlflow.sklearn.load_model(model_uri)
Answer: D
NEW QUESTION # 77
A data scientist has developed a model to predict whether or not it will rain using the expected temperature and expected cloud coverage. However, the proportion of days where it actually rains has increased dramatically from the proportion in the data on which the model was trained.
Which type of drift is present in the above scenario?
- A. Prediction drift
- B. Feature drift
- C. Concept drift
- D. Label drift
Answer: D
Explanation:
Label drift occurs when the distribution of the target variable (label) changes over time while the relationship between features and the label remains the same. In this scenario, the proportion of days when it rains (the label) has changed significantly compared to the training data, indicating label drift.
NEW QUESTION # 78
A data scientist has developed a model to predict ice cream sales using the expected temperature and expected number of hours of sun in the day. However, the expected temperature is dropping beneath the range of the input variable on which the model was trained.
Which type of drift is present in the above scenario?
- A. Prediction drift
- B. None of these
- C. Feature drift
- D. Label drift
- E. Concept drift
Answer: C
NEW QUESTION # 79
A Machine Learning Engineer developed a dynamic pricing model in MLflow that requires values from the company's cloud database to generate predictions. At inference time the PyFunc model uses the cloud provider's Python SDK to retrieve the latest values from the database. The inference code works well in a notebook, but when the engineer deploys the model to Databricks Model Serving, they receive 401 errors saying the user is not authenticated when trying to access the database. The engineer deploys the code via the REST API with the following payload:
Their Databricks administrators store cloud credentials under a Databricks secret scope called
"cloud_creds" with key "db_key". These credentials can be used to authenticate to the cloud provider's SDK.
Which change can the engineer make so the endpoint can authenticate to the remote database while avoiding storing the access tokens in plain text?
- A. Log the model to MLflow and store {{secrets/cloud_creds/db_key}} as a MLflow secret in
/.mlflow/credentials. Register the model in Unity Catalog. When deployed in Databricks Model Serving, MLflow will automatically authenticate when the model server starts. - B. Retrieve the secret values using a notebook with dbutils.secrets.get(scope="cloud_creds", key="db_key"). Log the model to MLflow with the access token value as a custom MLflow artifact.
Register the model in Unity Catalog. Change the PyFunc model code to read the artifact and pass the secret to the cloud provider's SDK. - C. Retrieve the secret values using a notebook with dbutils.secrets.get(scope="cloud_creds", key="db_key"). Add "environment_vars":
{"DB_ACCESS_TOKEN": ""} to the served_entity. Change the PyFunc model code to read the environment variable and pass the secret to the cloud provider's SDK. - D. Add "environment_vars": {"DB_ACCESS_TOKEN": "{{secrets/cloud_creds/db_key}}"} to the served_entity. Change the PyFunc model code to read the environment variable and pass the secret to the cloud provider's SDK.
Answer: D
Explanation:
Databricks Model Serving supports secure secret injection by referencing Databricks secret scopes directly in the served entity configuration. By mapping the secret to an environment variable using the {{secrets/scope/key}} syntax, the model can securely access the credential at runtime without exposing it in plain text. The PyFunc model can then read the environment variable and authenticate to the cloud provider's SDK, resolving the 401 error while following security best practices.
NEW QUESTION # 80
A machine learning engineer is attempting to create a webhook that will trigger a Databricks Job job_id when a model version for model model transitions into any MLflow Model Registry stage.
They have the following incomplete code block:
Which lines of code can be used to fill in the blank so that the code block accomplishes the task?
- A. "MODEL_VERSION_TRANSITIONED_TO_STAGING"
- B. "MODEL_VERSION_TRANSITIONED_TO_PRODUCTION"
- C. "MODEL_VERSION_TRANSITIONED_STAGE"
- D. "MODEL_VERSION_CREATED"
- E. "MODEL_VERSION_TRANSITIONED_TO_STAGING",
"MODEL_VERSION_TRANSITIONED_TO_PRODUCTION"
Answer: A
NEW QUESTION # 81
A Machine Learning Engineer is training a large-scale gradient boosting model using SparkML on a cluster of machines. The training job fails due to memory overflow on a single executor node after processing several iterations. The cluster resources are limited to executor nodes with 16 CPU cores and 64 GB RAM each. The engineer wants to continue training the model without changing hyperparameters or reducing the dataset size. They know Spark's architecture well and want to take advantage of its benefits. Which approach will allow the Machine Learning Engineer to solve this issue?
- A. Increase the number of executor nodes and implement data parallelism by partitioning the dataset across executors so each node trains the model on a subset of data.
- B. Increase the number of executor nodes and replicate the entire model on each node, then implement data parallelism to train on different mini-batches simultaneously.
- C. Increase the number of executor nodes and replicate the entire model on each node, then apply model parallelism to train different parts of the model in parallel.
- D. Increase the number of executor nodes and implement model parallelism by splitting the gradient boosting model across executors so each node trains a part of the model.
Answer: A
Explanation:
Spark ML algorithms, including gradient-boosted trees, are designed around data parallelism. By increasing the number of executor nodes, the dataset can be further partitioned so each executor processes only a subset of the data, reducing per-executor memory pressure while keeping the same model configuration and dataset size. This leverages Spark's distributed architecture without requiring model parallelism or hyperparameter changes.
NEW QUESTION # 82
A Machine Learning Engineer is building a fraud detection model that needs to use both pre- computed features from a feature table and real-time calculated features based on user location data sent with each inference request. The engineer has created a Python UDF called calculate_distance in Unity Catalog at main.fraud_detection.calculate_distance that computes the distance between a transaction location and the user's current location. The feature table main.fraud_detection.user_features contains historical user spending patterns with primary key user_id.
The engineer has written the following code to implement this scenario:
Which benefit of this implementation approach makes it suited to the real-time fraud detection use case?
- A. The FeatureLookup function avoids the need for joining the full table main.fraud_detection.user_features with training_set increasing efficiency.
- B. The FeatureFunction caches computed distance values in the online store to improve inference latency for location pairs.
- C. The model automatically performs feature lookup and computation during inference without additional serving code.
- D. The Unity Catalog registry automatically creates REST API endpoints for UDF functions used in feature computation.
Answer: C
Explanation:
By defining both FeatureLookup and FeatureFunction objects in the training set and logging the model with the FeatureEngineeringClient, the feature logic is packaged with the model. During inference, Databricks automatically performs feature lookups from the feature table and computes the on-demand distance feature using request-time inputs, without requiring any additional custom serving or feature-joining code. This makes the approach well suited for real-time fraud detection.
NEW QUESTION # 83
A machine learning engineer has deployed a model recommender using MLflow Model Serving.
They now want to query the version of that model that is in the Production stage of the MLflow Model Registry. Which of the following model URIs can be used to query the described model version?
- A. https://<databricks-instance>/model/recommender/stage-production/invocations
- B. https://<databricks-instance>/model/recommender/Production/invocations
- C. https://<databricks-instance>/model-serving/recommender/Production/invocations
- D. The version number of the model version in Production is necessary to complete this task.
- E. https://<databricks-instance>/model-serving/recommender/stage-production/invocations
Answer: D
NEW QUESTION # 84
A machine learning engineer is converting a Hyperopt-based hyperparameter tuning process from manual MLflow logging to MLflow Autologging. They are trying to determine how to manage nested Hyperopt runs with MLflow Autologging.
Which of the following approaches will create a single parent run for the process and a child run for each unique combination of hyperparameter values when using Hyperopt and MLflow Autologging?
- A. MLflow Autoloqqinq will automatically accomplish this task with Hyperopt
- B. There is no way to accomplish nested runs with MLflow Autoloqqinq and Hyperopt
- C. Starting a manual child run within the objective function
- D. Ensuring that a built-in model flavor is used for the model logging
- E. Startinq a manual parent run before calling fmin
Answer: E
NEW QUESTION # 85
Which tool can be used to automatically start a testing Job when a new version of an MLflow Model Registry model is registered?
- A. MLflow Model Registry Webhooks
- B. MLflow REST API
- C. MLflow Model Registry UI
- D. MLflow Client API
Answer: A
Explanation:
MLflow Model Registry Webhooks can be configured to automatically trigger actions - such as running a testing job - when events occur, like registering a new model version. This enables automation in CI/CD workflows for machine learning models.
NEW QUESTION # 86
Which is a benefit of logging an input example with an MLflow model?
- A. An example prediction is available to test post-inference pipelines
- B. An example record is available to test serving applications
- C. The model evaluation metrics are stored with the model
- D. The environment requirements are packaged with the MLmodel file
Answer: B
Explanation:
Logging an input example with an MLflow model provides a concrete sample of the data format expected by the model. This helps serving applications and users understand the model's input structure and verify that inference requests are properly formatted when deploying or testing the model in production.
NEW QUESTION # 87
A machine learning engineer wants to log feature importance data from a CSV file at path importance_path with an MLflow run for model model.
Which of the following code blocks will accomplish this task inside of an existing MLflow run block?
A)
B)
C) mlflow.log_data(importance_path, "feature-importance.csv")
D) mlflow.log_artifact(importance_path, "feature-importance.csv")
E) None of these code blocks tan accomplish the task.
- A. Option D
- B. Option C
- C. Option E
- D. Option A
- E. Option B
Answer: D
NEW QUESTION # 88
Which of the following tools can assist in real-time deployments by packaging software with its own application, tools, and libraries?
- A. REST APIs
- B. Cloud-based compute
- C. Autoscaling clusters
- D. None of these tools
- E. Containers
Answer: B
NEW QUESTION # 89
A Machine Learning Engineer has a production AI model that predicts fraudulent transactions in real time. This model is integrated into critical business workflows and any downtime could result in significant financial loss and regulatory penalties. The engineer needs to deploy a new, improved version of the model to production to replace the existing model. The bank's fairness policy requires that all transactions be exposed to the same model at any given time. Additionally, the deployment must meet the following requirements:
- Zero downtime: The fraud detection service must remain continuously
available to users and downstream systems.
- Immediate rollback: If the new model causes issues, you must be able
to revert to the previous version instantly.
Which deployment strategy meets these requirements?
- A. Shadow
- B. Canary
- C. Rolling
- D. Blue-Green
Answer: D
Explanation:
Blue-green deployment maintains two fully operational production environments and switches all traffic from the old model to the new model at once. This guarantees zero downtime and ensures that all transactions are handled by the same model version at any given time. If issues arise, traffic can be immediately switched back to the previous environment, enabling instant rollback while meeting strict fairness and availability requirements.
NEW QUESTION # 90
A data scientist set up a machine learning pipeline to automatically log a data visualization with each run. They now want to view the visualizations in Databricks.
Which of the following locations in Databricks will show these data visualizations?
- A. The MLflow Model Registry Model paqe
- B. The Artifacts section of the MLflow Run page
- C. Logged data visualizations cannot be viewed in Databricks
- D. The Artifacts section of the MLflow Experiment page
- E. The Figures section of the MLflow Run page
Answer: E
NEW QUESTION # 91
A data scientist is using MLflow to track their machine learning experiment. As a part of each MLflow run, they are performing hyperparameter tuning. The data scientist would like to have one parent run for the tuning process with a child run for each unique combination of hyperparameter values.
They are using the following code block:
The code block is not nesting the runs in MLflow as they expected.
Which of the following changes does the data scientist need to make to the above code block so that it successfully nests the child runs under the parent run in MLflow?
- A. Indent the child run blocks within the parent run block
- B. Add the nested=True argument to the parent run
- C. Provide the same name to the run name parameter for all three run blocks
- D. Add the nested=True argument to the parent run and remove the nested=True arguments from the child runs
- E. Remove the nested=True argument from the child runs
Answer: D
NEW QUESTION # 92
A Machine Learning Engineer wants to monitor the quality and stability of their machine learning model's predictions over time. They have a Delta table, retail_inference_log, which records each model prediction along with input features, a timestamp, and (when available) the true label. They need to detect data drift and monitor model performance trends using Databricks Lakehouse Monitoring, ensuring that alerts are triggered if the distribution of predictions or input features changes significantly. Which approach will set up monitoring for this use case?
- A. Create a monitor with the Snapshot profile on the retail_inference_log table, so that metrics are calculated over the entire table each time the monitor runs and therefore is able to compare new values with previous ones to compute data drift.
- B. Create a monitor with the Inference profile on the retail_inference_log table, and specify a recent batch of production data as the baseline table for drift detection. Use this recent production data to compare against new data for drift and performance monitoring.
- C. Create a monitor with the Time Series profile on the retail_inference_log table, specifying the timestamp column and including model input, prediction columns and the true label column. This will track drift in features and predictions over time, and model performance could also be tracked using a custom metric.
- D. Create a monitor with the Inference profile on the retail_inference_log table, specifying the timestamp column and the columns for model inputs, predictions, and labels. Configure the monitor to compute drift and performance metrics over time windows.
Answer: D
Explanation:
The Inference profile is specifically designed for monitoring production inference logs. By configuring it on the inference table with the timestamp, input feature columns, prediction column, and label column, Databricks Lakehouse Monitoring can automatically compute prediction drift, input feature drift, and model performance metrics over rolling time windows, and trigger alerts when significant distribution changes or performance degradation are detected.
NEW QUESTION # 93
A Machine Learning Engineer needs to deploy a custom model using Databricks Model Serving.
The model requires an external tokenizer file (for example, a vocabulary or pre-trained tokenizer) to function correctly. They need to ensure this tokenizer file is included with the model so it is available during model serving. How should they package this tokenizer file as part of the model deployment?
- A. Use the artifacts parameter in mlflow.pyfunc.log_model() to package the tokenizer file, referencing its path in Volumes.
- B. Include tokenizer file as part of the model's software dependencies by adding it to the conda_env specification.
- C. Access the tokenizer file directly from Volumes at model inference time, which requires pre- provisioning access to the Volume for every model serving endpoint.
- D. Use the code_paths parameter in mlflow.pyfunc.log_model() to include the tokenizer file, assuming it's part of the custom Python logic needed by the model.
Answer: A
Explanation:
The artifacts parameter in mlflow.pyfunc.log_model is designed for packaging non-code assets required at inference time, such as tokenizer files. By logging the tokenizer as a model artifact and referencing its path, MLflow ensures the file is versioned with the model and automatically made available to Databricks Model Serving during inference.
NEW QUESTION # 94
How can you save a trained Spark ML PipelineModel?
- A. pipelineModel.write().save()
- B. pipeline.save()
- C. pipeline.persist()
- D. pipeline.store()
Answer: A
Explanation:
Example:
pipelineModel.write().overwrite().save("/model")
NEW QUESTION # 95
Why is Delta Lake time travel useful in ML pipelines?
- A. Faster model inference
- B. Model tuning
- C. Smaller datasets
- D. Reproducible training datasets
Answer: D
Explanation:
Time travel allows training on exact historical datasets.
NEW QUESTION # 96
A machine learning engineer has deployed a model recommender using MLflow Model Serving.
They now want to query the version of that model that is in the Production stage of the MLflow Model Registry. Which of the following model URls can be used to query the described model version?
- A. The version number of the model version in Production is necessary to complete this task.
- B. https:///model-serving/recommender/Production/invocations
- C. https:///model/recommender/Production/invocations
- D. https:///model/recommender/stage-production/invocations
Answer: C
Explanation:
In MLflow Model Serving, the correct URL pattern to query a specific stage of a registered model is https:///model/<model_name>/<stage>/invocations Thus, to query the model named recommender in the Production stage, the proper endpoint is
https:///model/recommender/Production/invocations.
This allows direct access to the active production version without needing its version number.
NEW QUESTION # 97
......
Databricks Databricks-Machine-Learning-Professional Actual Questions and Braindumps: https://pass4sure.examtorrent.com/Databricks-Machine-Learning-Professional-prep4sure-dumps.html
