I have a python model training script that requires argparse
arguments, but I have no idea how to pass them through Azure CLI command az ml run submit-script
.
It seems like this is possible in the the official documentation here: https://learn.microsoft.com/en-us/cli/azure/ml(v1)/run?view=azure-cli-latest#az-ml(v1)-run-submit-script
I tried:
az ml run submit-script -g resource-group -w workspacename -e experiment-name --ct compute_cluster --script_argument1 arg1 --script_argument2 arg2 train.py
and
az ml run submit-script -g resource-group -w workspacename -e experiment-name --ct compute_cluster <script_argument1> arg1 <script_argument2> arg2 train.py
but they both failed. I can't find working examples online, so I'm asking here.
EDIT:
I resolved the issue. You just have to put script arguments after train.py
like below:
az ml run submit-script -g resource-group -w workspacename -e experiment-name --ct compute_cluster train.py --script_argument1 arg1 --script_argument2 arg2
You can add script arguments after train.py like below:
az ml run submit-script -g resource-group -w workspacename -e experiment-name --ct compute_cluster train.py --script_argument1 arg1 --script_argument2 arg2
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.