File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -27,13 +27,16 @@ steps:
27
27
set -e # fail on error
28
28
29
29
# Create model package using CLI
30
- IMAGE_LOCATION=$(\
31
30
az ml model package --workspace-name $(WORKSPACE_NAME) -g $(RESOURCE_GROUP) \
32
31
--model '${{ parameters.modelId }}' \
33
32
--entry-script '${{ parameters.scoringScriptPath }}' \
34
33
--cf '${{ parameters.condaFilePath }}' \
35
- --rt python --query 'location' -o tsv)
34
+ -v \
35
+ --rt python --query 'location' -o tsv > image_logs.txt
36
36
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)
39
42
echo "##vso[task.setvariable variable=IMAGE_LOCATION]$IMAGE_LOCATION"
You can’t perform that action at this time.
0 commit comments