Databricks Machine Learning Professional exam dumps

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

Select 3

You are training a machine learning model in Databricks and using MLflow to track experiments. As part of your workflow, you want to ensure the logged model's schema is accurately captured to avoid compatibility issues during deployment. Which of the following steps should you include in your MLflow experiment tracking workflow to log the model schema using model signatures and input examples?

  1. A

    Log the model using mlflow.pyfunc.log_model() and provide signature and input_example arguments.

  2. B

    Use mlflow.log_param() to log the model's schema and input examples manually.

  3. C

    Generate an example input DataFrame and pass it as the input_example argument when logging the model.

  4. D

    Use mlflow.log_metric() to capture the model's signature for schema tracking.

  5. E

    Use mlflow.models.infer_signature() to infer the model's input and output schema from a sample input and output.

Show answer and explanation

Correct answers: A, C, E

Explanation

To effectively track a model's schema using MLflow, you need to log the model with a signature and input examples. The signature can be inferred using mlflow.models.infer_signature() from sample input and output data, and an input example should be provided when logging the model. This ensures schema compatibility during deployment. Using mlflow.pyfunc.log_model() with appropriate arguments is the recommended approach, while other methods like mlflow.log_param() or mlflow.log_metric() are not designed for schema tracking.

  • A. Correct.

    Correct. mlflow.pyfunc.log_model() allows you to log a model with its signature and input examples. This is essential for ensuring the schema is properly captured.

  • B. Incorrect.

    Incorrect. mlflow.log_param() is used for tracking experiment parameters, not for logging model schema or input examples.

  • C. Correct.

    Correct. Providing an example input DataFrame as the input_example argument is a key step in logging the model's schema correctly.

  • D. Incorrect.

    Incorrect. mlflow.log_metric() is used for tracking performance metrics, not for schema or input example logging.

  • E. Correct.

    Correct. mlflow.models.infer_signature() is used to infer the input and output schema from a sample input and output, which is crucial for defining the model signature.

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