Databricks Machine Learning Associate exam dumps

Databricks Machine Learning Associate practice question 42 of 656

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

Databricks Machine Learning Associate Question 42

Single answer

You are working on a shared Databricks cluster and need to install a Python library so that it is available to all notebooks running on this cluster. Which of the following is the correct method to achieve this?

  1. A

    Use %pip install <library-name> in the first cell of all notebooks on the cluster.

  2. B

    Install the library via the Libraries tab in the Cluster configuration page.

  3. C

    Use the dbutils.library.install command in one notebook, and it will automatically apply to the cluster.

  4. D

    Run %conda install <library-name> in a notebook which will install it for the cluster.

Show answer and explanation

Correct answer: B

Explanation

To make a Python library available to all notebooks on a Databricks cluster, you must install it via the Libraries tab in the Cluster configuration page. This ensures that the library is installed at the cluster level and is accessible to all notebooks that use the cluster. Notebook-specific commands like %pip install only install the library for the current notebook session and do not propagate the installation to all other notebooks on the cluster.

  • A. Incorrect.

    Using %pip install <library-name> installs the library only for the current notebook session. It does not make the library available to all notebooks on the cluster.

  • B. Correct.

    Installing the library via the Libraries tab in the Cluster configuration page ensures the library is installed at the cluster level and is available to all notebooks running on the cluster.

  • C. Incorrect.

    dbutils.library.install is not a valid method for installing libraries in a Databricks environment. This option is incorrect.

  • D. Incorrect.

    %conda is not supported in Databricks for library installation. Libraries should be installed using %pip or the Libraries tab in the Cluster configuration page.

Timed practice exam

Take a Databricks Machine Learning Associate practice test under exam conditions

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

Start timed exam