I'm trying to start a training job on Azure ML from an Azure function (blob trigger) using Python. Here're the two ways I've seen it done:
- Using the command function from azure.ai.ml
inputs=dict(
data_folder=Input(type="uri_folder", path=web_path)
),
compute=gpu_compute_target,
environment=curated_env_name,
code="./src/",
command="python tf_mnist.py --data-folder ${{inputs.data_folder}}",
experiment_name="tf-dnn-image-classify",
display_name="tensorflow-classify-mnist-digit-images-with-dnn",
)
ml_client.jobs.create_or_update(job)
- Using ScriptRunConfig class from azureml.core
script='train.py',
arguments=['--input-data-dir', dataset.as_named_input('input').as_mount(),
'--reg', '0.99'],
run_config=run_config)
run = experiment.submit(config=src)
What is the difference between these? My source code is in a remote repo and this bit of code would be running in an Azure function. Which of these methods is suitable for my scenario?