Databricks Machine Learning Professional exam dumps

Databricks Machine Learning Professional practice question 76 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 76

Select 2

You are working on a machine learning project in Databricks and need to programmatically register a new model version after training a model. Which of the following steps are required to accomplish this using the MLflow library?

  1. A

    Use the mlflow.log_model() function to save the model locally before registering it.

  2. B

    Use the mlflow.register_model() function to create a new model version.

  3. C

    Specify the model URI and model name while using the mlflow.register_model() function.

  4. D

    Use the mlflow.set_registry_uri() function to set the model registry location before registering the model.

  5. E

    Use the mlflow.create_run() function to generate a new run ID for the registered model.

Show answer and explanation

Correct answers: B, C

Explanation

To programmatically register a new model version in Databricks, you must use the mlflow.register_model() function. This function requires you to provide the URI of the logged model (e.g., from mlflow.log_model()) and the name of the model in the Model Registry. Other functions, like mlflow.set_registry_uri() or mlflow.create_run(), are not part of the essential steps for registration.

  • A. Incorrect.

    Incorrect: mlflow.log_model() is used to log the model artifact to an MLflow tracking server or local directory but does not handle model registration directly.

  • B. Correct.

    Correct: The mlflow.register_model() function is used to register a new model version in the MLflow Model Registry.

  • C. Correct.

    Correct: When using mlflow.register_model(), you must specify the model URI (location of the logged model) and a name for the model in the Model Registry.

  • D. Incorrect.

    Incorrect: While the mlflow.set_registry_uri() function can be used to set the registry URI in advanced setups, it is not required for registering a model if you're using the default registry location.

  • E. Incorrect.

    Incorrect: The mlflow.create_run() function is used to create a new run within an experiment but is not involved in the process of model registration.

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