LeetQuiz Logo
Privacy Policy•contact@leetquiz.com
© 2025 LeetQuiz All rights reserved.
Microsoft Certified Azure Data Scientist Associate - DP-100

Microsoft Certified Azure Data Scientist Associate - DP-100

Get started today

Ultimate access to all questions.


You have a Python script named train.py in a local folder named scripts. The script trains a regression model using scikit-learn and includes code to load a training data file from the same scripts folder.

You must run the script as an Azure ML experiment on a compute cluster named aml-compute. You need to configure the run to ensure the environment includes the required packages for model training. You have instantiated a variable named aml_compute that references the target compute cluster.

Solution: Run the following code:

from azureml.core import ScriptRunConfig, Experiment

src = ScriptRunConfig(source_directory='scripts',
                      script='train.py',
                      compute_target=aml_compute)
run_config = src.run_config
run_config.environment.python.conda_dependencies = 'scikit-learn'
experiment = Experiment(workspace=ws, name='train-experiment')
run = experiment.submit(src)

Does the solution meet the goal?

Exam-Like
Quiz related visual


Powered ByGPT-5