Databricks Machine Learning Professional exam dumps

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

Select 3

You are building a machine learning model with Databricks and want to ensure the model's inputs and outputs are well-documented for future use. You decide to use MLflow to log the model with a signature and an input example. Which of the following steps are necessary to achieve this?

  1. A

    Use the mlflow.models.signature.infer_signature function to capture the model's input and output schema.

  2. B

    Provide a sample input DataFrame when calling mlflow.log_model to log the input example.

  3. C

    Manually define the input schema by writing a JSON file and upload it as a model artifact.

  4. D

    Call mlflow.log_model with the signature and input_example parameters.

  5. E

    Use the mlflow.create_signature function to create a signature object before logging the model.

Show answer and explanation

Correct answers: A, B, D

Explanation

To effectively use MLflow for experiment tracking and ensure the model's input and output schemas are captured, you need to use the mlflow.models.signature.infer_signature function to infer the schema, provide a valid input example, and log both using the mlflow.log_model function. This ensures transparency and reproducibility for your machine learning workflows.

  • A. Correct.

    Correct. The mlflow.models.signature.infer_signature function is used to automatically infer the schema of the model's inputs and outputs from a DataFrame or array, which is essential for creating the model signature.

  • B. Correct.

    Correct. Providing a sample input DataFrame as the input_example parameter helps document the expected input structure for the model, making it easier to reuse or validate later.

  • C. Incorrect.

    Incorrect. While it is possible to define a schema manually, MLflow provides functionality to infer the schema and log it automatically, making manual efforts unnecessary.

  • D. Correct.

    Correct. The mlflow.log_model function allows you to attach the inferred signature and an input example to the logged model, ensuring the inputs and outputs are well-documented.

  • E. Incorrect.

    Incorrect. There is no mlflow.create_signature function in MLflow. The correct approach is to use mlflow.models.signature.infer_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