Databricks Machine Learning Professional exam dumps

Databricks Machine Learning Professional practice question 26 of 280

Databricks Certified Machine Learning Professional. Professional level, Databricks. Free question with the correct answer and a full explanation.

Databricks Machine Learning Professional Question 26

Single answer

You are a data scientist working on a machine learning project in Databricks, and you want to programmatically retrieve the metadata of an MLflow model registered under the name 'sales_forecast_model' to check its latest version and stage (e.g., 'Staging', 'Production'). Which method would you use to achieve this?

  1. A

    mlflow.get_tracking_uri()

  2. B

    mlflow.register_model(model_uri, name)

  3. C

    mlflow.search_registered_models()

  4. D

    mlflow.client.MlflowClient().get_registered_model()

Show answer and explanation

Correct answer: D

Explanation

To programmatically access metadata of a registered MLflow model, such as its version and stage, you must use the get_registered_model method within the MlflowClient class. This method provides detailed information about the model, making it the correct choice for this task. Other options either perform unrelated actions or lack the functionality to retrieve model metadata.

  • A. Incorrect.

    This method retrieves the tracking server URI but does not provide access to model metadata. It is unrelated to the task described in the question.

  • B. Incorrect.

    This method is used to register a model to the MLflow model registry, not to retrieve metadata of an already registered model.

  • C. Incorrect.

    This method allows searching through all registered models but does not retrieve metadata of a specific model like version or stage.

  • D. Correct.

    This method, from the MlflowClient API, is specifically designed to programmatically retrieve metadata about a registered MLflow model, including its latest version and stage.

Timed practice exam

Take a Databricks Machine Learning Professional practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam