
Microsoft Certified Azure Data Scientist Associate - DP-100
Get started today
Ultimate access to all questions.
You create a weather forecasting model and need to build a pipeline that executes a processing script to load data from a datastore. The processed data must then be passed to a training script.
You implement the following solution:
from azureml.pipeline.core import Pipeline
from azureml.pipeline.steps import PythonScriptStep
# Define the processing step
processing_step = PythonScriptStep(
name='process_data',
script_name='processing_script.py',
arguments=['--input_data', input_dataset],
inputs=[input_dataset],
compute_target=compute_cluster,
source_directory=source_dir
)
# Define the training step
training_step = PythonScriptStep(
name='train_model',
script_name='training_script.py',
arguments=['--input_data', processing_step.output],
inputs=[processing_step.output],
compute_target=compute_cluster,
source_directory=source_dir
)
# Create and run the pipeline
pipeline = Pipeline(workspace=ws, steps=[processing_step, training_step])
pipeline_run = experiment.submit(pipeline)
Does this solution meet the goal?
You create a weather forecasting model and need to build a pipeline that executes a processing script to load data from a datastore. The processed data must then be passed to a training script.
You implement the following solution:
from azureml.pipeline.core import Pipeline
from azureml.pipeline.steps import PythonScriptStep
# Define the processing step
processing_step = PythonScriptStep(
name='process_data',
script_name='processing_script.py',
arguments=['--input_data', input_dataset],
inputs=[input_dataset],
compute_target=compute_cluster,
source_directory=source_dir
)
# Define the training step
training_step = PythonScriptStep(
name='train_model',
script_name='training_script.py',
arguments=['--input_data', processing_step.output],
inputs=[processing_step.output],
compute_target=compute_cluster,
source_directory=source_dir
)
# Create and run the pipeline
pipeline = Pipeline(workspace=ws, steps=[processing_step, training_step])
pipeline_run = experiment.submit(pipeline)
Does this solution meet the goal?
Exam-Like
