Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Test and troubleshoot model endpoints

A worked example

Complete the statement

A data scientist is debugging the blue deployment of a managed online endpoint before deploying it to the cloud. Docker is installed on her workstation, and she already created a local endpoint named noshow-ep. The first time she deployed blue to her workstation, Docker built a container image from the environment section of blue-deployment.yml. The YAML file references her local scoring script, score.py.

After testing, she removes the local deployment while retaining the endpoint and the image in Docker's cache. She then edits only score.py. The environment section of blue-deployment.yml is unchanged. She runs the same deployment command again so that the deployment runs on her workstation and not in Azure.

Complete the command and the statement about what happens on the second run.

az ml online-deployment create --endpoint-name noshow-ep -n blue -f blue-deployment.yml 

On the second run, Docker , and the edited score.py reaches the container because it is .

  • Blank 1: --local (correct answer)

    --local selects deployment in the workstation's Docker environment. --all-traffic does not select local deployment; neither does --no-wait or --skip-script-validation. Each incorrect option leaves the required --local flag absent.

  • Blank 2: reuses the existing image from the local Docker cache (correct answer)

    The retained image matches the unchanged environment configuration, so Docker reuses it. Building a new image is unnecessary because the matching image remains cached and only mounted code changed. Pulling a fresh image from the workspace registry does not match the documented reuse of the matching cached image.

  • Blank 3: mounted into the container from the local files (correct answer)

    Local deployment mounts code files from the workstation into the container. Copying the script into a rebuilt image is incorrect because this deployment reuses the cached image. Downloading the script from a workspace datastore is incorrect because the configuration references the local script.

Why

Adding --local deploys to Docker on the workstation for testing before cloud deployment. On the second create operation, Docker reuses the retained image because its environment configuration still matches. The local code is mounted into the container, making the edited score.py available without rebuilding the image.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free