Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ set -e

# <set_variables>
export ENDPOINT_NAME="<YOUR_ENDPOINT_NAME>"
# imagenet sample base URI
IMAGENET_SAMPLE_URI_BASE="https://automlsamplenotebookdata.blob.core.windows.net/batch/data/imagenet"
# </set_variables>

# <name_endpoint>
Expand All @@ -14,7 +16,7 @@ ENDPOINT_NAME="$ENDPOINT_NAME-$ENDPOINT_SUFIX"

echo "Download model from Azure Storage"
# <download_model>
wget https://azuremlexampledata.blob.core.windows.net/data/imagenet/model.zip
wget "${IMAGENET_SAMPLE_URI_BASE}/model.zip"
unzip model.zip -d .
# </download_model>

Expand Down Expand Up @@ -51,7 +53,7 @@ az ml batch-deployment show --name $DEPLOYMENT_NAME --endpoint-name $ENDPOINT_NA
# </query_deployment>

# <download_sample_data>
wget https://azuremlexampledata.blob.core.windows.net/data/imagenet/imagenet-1000.zip
wget "${IMAGENET_SAMPLE_URI_BASE}/imagenet-1000.zip"
unzip imagenet-1000.zip -d data
# </download_sample_data>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ set -e

# <set_variables>
export ENDPOINT_NAME="<YOUR_ENDPOINT_NAME>"
# sample input URI variable
SAMPLE_INPUT_URI="https://automlsamplenotebookdata.blob.core.windows.net/batch/data/mnist/sample"
# </set_variables>

# <name_endpoint>
Expand Down Expand Up @@ -46,7 +48,7 @@ az ml batch-deployment show --name $DEPLOYMENT_NAME --endpoint-name $ENDPOINT_NA

echo "Invoking batch endpoint with public URI (MNIST)"
# <start_batch_scoring_job>
JOB_NAME=$(az ml batch-endpoint invoke --name $ENDPOINT_NAME --input https://azuremlexampledata.blob.core.windows.net/data/mnist/sample --input-type uri_folder --query name -o tsv)
JOB_NAME=$(az ml batch-endpoint invoke --name $ENDPOINT_NAME --input $SAMPLE_INPUT_URI --input-type uri_folder --query name -o tsv)
# </start_batch_scoring_job>

echo "Showing job detail"
Expand Down Expand Up @@ -80,7 +82,7 @@ echo "Invoke batch endpoint with specific output file name"
OUTPUT_FILE_NAME=predictions_`echo $RANDOM`.csv
OUTPUT_PATH="azureml://datastores/workspaceblobstore/paths/$ENDPOINT_NAME"

JOB_NAME=$(az ml batch-endpoint invoke --name $ENDPOINT_NAME --input https://azuremlexampledata.blob.core.windows.net/data/mnist/sample --output-path $OUTPUT_PATH --set output_file_name=$OUTPUT_FILE_NAME --query name -o tsv)
JOB_NAME=$(az ml batch-endpoint invoke --name $ENDPOINT_NAME --input $SAMPLE_INPUT_URI --output-path $OUTPUT_PATH --set output_file_name=$OUTPUT_FILE_NAME --query name -o tsv)
# </start_batch_scoring_job_set_output>

echo "Invoke batch endpoint with specific overwrites"
Expand Down Expand Up @@ -133,7 +135,7 @@ az ml batch-deployment create --file deployment-keras/deployment.yml --endpoint-
echo "Invoke batch endpoint with public data"
# <test_deployment_non_default>
DEPLOYMENT_NAME="mnist-keras-dpl"
JOB_NAME=$(az ml batch-endpoint invoke --name $ENDPOINT_NAME --deployment-name $DEPLOYMENT_NAME --input https://azuremlexampledata.blob.core.windows.net/data/mnist/sample --input-type uri_folder --query name -o tsv)
JOB_NAME=$(az ml batch-endpoint invoke --name $ENDPOINT_NAME --deployment-name $DEPLOYMENT_NAME --input $SAMPLE_INPUT_URI --input-type uri_folder --query name -o tsv)
# </test_deployment_non_default>

echo "Show job detail"
Expand Down Expand Up @@ -174,7 +176,7 @@ az ml batch-endpoint show --name $ENDPOINT_NAME --query "{Name:name, Defaults:de

echo "Invoke batch endpoint with the new default deployment with public URI"
# <test_default_deployment>
JOB_NAME=$(az ml batch-endpoint invoke --name $ENDPOINT_NAME --input https://azuremlexampledata.blob.core.windows.net/data/mnist/sample --input-type uri_folder --query name -o tsv)
JOB_NAME=$(az ml batch-endpoint invoke --name $ENDPOINT_NAME --input $SAMPLE_INPUT_URI --input-type uri_folder --query name -o tsv)
# </test_default_deployment>

echo "Stream job logs to console"
Expand Down
Loading