Skip to content

Commit bae4b61

Browse files
author
j-so
committed
fix model package to show logs
1 parent 7a69c0e commit bae4b61

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.pipelines/diabetes_regression-package-model-template.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,16 @@ steps:
2727
set -e # fail on error
2828
2929
# Create model package using CLI
30-
IMAGE_LOCATION=$(\
3130
az ml model package --workspace-name $(WORKSPACE_NAME) -g $(RESOURCE_GROUP) \
3231
--model '${{ parameters.modelId }}' \
3332
--entry-script '${{ parameters.scoringScriptPath }}' \
3433
--cf '${{ parameters.condaFilePath }}' \
35-
--rt python --query 'location' -o tsv)
34+
-v \
35+
--rt python --query 'location' -o tsv > image_logs.txt
3636
37-
# Set environment variable
38-
echo $IMAGE_LOCATION
37+
# Show logs
38+
cat image_logs.txt
39+
40+
# Set environment variable using the last line of logs that has the package location
41+
IMAGE_LOCATION=$(tail -n 1 image_logs.txt)
3942
echo "##vso[task.setvariable variable=IMAGE_LOCATION]$IMAGE_LOCATION"

0 commit comments

Comments
 (0)