nerdexam
Microsoft

DP-100 · Question #428

You plan to run a script as an experiment. The script uses modules from the SciPy library and several Python packages that are not typically installed in a default conda environment. You plan to run…

The correct answer is C. Create and register an environment that includes the required packages. Use this environment for. Creating and registering a reusable Azure ML environment that includes all required packages guarantees consistent execution across both local and remote compute with minimal ongoing effort.

Explore data and run experiments

Question

You plan to run a script as an experiment. The script uses modules from the SciPy library and several Python packages that are not typically installed in a default conda environment. You plan to run the experiment on your local workstation for small datasets and scale out the experiment by running it on more powerful remote compute dusters for larger datasets. You need to ensure that the experiment runs successfully on local and remote compute with the least administrative effort. What should you do?

Options

  • ALeave the environment unspecified for the experiment. Run the expenment by using the default
  • BCreate a config.yaml file that defines the required conda packages and save the file in the
  • CCreate and register an environment that includes the required packages. Use this environment for
  • DCreate a virtual machine (VM) by using the required Python configuration and attach the VM as a

How the community answered

(27 responses)
  • A
    4% (1)
  • B
    4% (1)
  • C
    81% (22)
  • D
    11% (3)

Why each option

Creating and registering a reusable Azure ML environment that includes all required packages guarantees consistent execution across both local and remote compute with minimal ongoing effort.

ALeave the environment unspecified for the experiment. Run the expenment by using the default

The default conda environment does not include SciPy or non-standard packages, so the experiment would fail when those modules are imported.

BCreate a config.yaml file that defines the required conda packages and save the file in the

A config.yaml file must still be explicitly referenced and managed per run configuration, and does not offer the reusability of a registered environment across multiple compute targets.

CCreate and register an environment that includes the required packages. Use this environment forCorrect

A registered Azure ML environment encapsulates all conda and pip dependencies, including SciPy and custom packages, into a reusable definition that can be referenced by any compute target. Once registered, the same environment object is specified in the ScriptRunConfig for both local and remote runs, eliminating the need to manually manage package installation on each compute target and ensuring reproducibility.

DCreate a virtual machine (VM) by using the required Python configuration and attach the VM as a

Creating and attaching a custom VM requires significant administrative effort to provision, configure, and maintain, violating the least-effort requirement.

Concept tested: Creating and registering reusable Azure ML environments

Source: https://learn.microsoft.com/en-us/azure/machine-learning/how-to-use-environments

Topics

#Azure Machine Learning environments#Experiment reproducibility#Compute targets#Package management

Community Discussion

No community discussion yet for this question.

Full DP-100 Practice