Create the script run configuration

PHOTO EMBED

Fri Apr 08 2022 23:22:47 GMT+0000 (Coordinated Universal Time)

Saved by @wessim

from azureml.core import ScriptRunConfig

src = ScriptRunConfig(source_directory=project_folder,
                      script='train.py',
                      compute_target=my_compute_target,
                      environment=myenv)

# Set compute target
# Skip this if you are running on your local computer
script_run_config.run_config.target = my_compute_target
content_copyCOPY

Now that you have a compute target (my_compute_target) and environment (myenv ), create a script run configuration that runs your training script ```train.py``` located in your project_folder directory. If you do not specify an environment, a default environment will be created for you. If you have command-line arguments you want to pass to your training script, you can specify them via the arguments parameter of the ScriptRunConfig constructor, e.g. arguments=['--arg1', arg1_val, '--arg2', arg2_val]. If you want to override the default maximum time allowed for the run, you can do so via the max_run_duration_seconds parameter. The system will attempt to automatically cancel the run if it takes longer than this value.
https://docs.microsoft.com/en-us/azure/machine-learning/how-to-set-up-training-targets