Skip to content

AI-300 · Domain 1: Design and implement an MLOps infrastructure · 19% of the exam

Task 1.2: Create and manage assets in a Machine Learning workspace

Data assets, curated and custom environments, components, and sharing models, components, environments and data across workspaces with registries.

Study it

  • Data assets and their versions

    Lesson coming

  • Curated and custom environments and image builds

    Partly covered by: Images, Layers & Multi-Stage Builds

  • Components and registries for sharing assets across workspaces

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the Microsoft documentation page that proves it.

Question 1 · choose 1

A custom environment lists numpy without a version. A team copied it under a new name and version to pick up a newer numpy, but the job still runs the old numpy from the cached image. What should the team change?

  1. AGive the environment another new name and a higher version number, then submit the job again
  2. BPin the numpy version it needs in the conda specification, which changes the environment hash
  3. CSwitch the job to a curated environment with the same name prefix so the cache is bypassed
  4. DRe-create the environment from the same YAML file under the original name, then resubmit the job
Show the answer and why
  • AGive the environment another new name and a higher version number, then submit the job again

    Incorrect

    The environment name and version don't affect the hash, so the cached image is reused.

  • BPin the numpy version it needs in the conda specification, which changes the environment hash

    Correct

    A version change in the package list changes the environment hash, so a new image is built.

  • CSwitch the job to a curated environment with the same name prefix so the cache is bypassed

    Incorrect

    Curated names are reserved for Microsoft's environments, and the job would lose the custom packages.

  • DRe-create the environment from the same YAML file under the original name, then resubmit the job

    Incorrect

    An identical definition produces the same hash, so the cached image is reused again.

Azure Machine Learning hashes the base image, custom Docker steps and Python packages of an environment definition to decide whether to reuse a cached image; the name and version don't count. An unpinned dependency keeps the version available when the environment was first built, so to update it you specify a version, which changes the hash and forces a rebuild.

Question 2 · choose 1

A workspace's storage account and container registry were just put behind private endpoints. Since then, jobs with custom environments fail while building images with an error about communicating with the container registry. Curated environments still work. What should you do?

  1. AEnable the admin user on the container registry so that the default image build can authenticate to it
  2. BLeave image building to the workspace's default serverless compute and add the registry's IP to its firewall
  3. CMove the jobs to curated environments and install the extra packages at the start of each training script instead
  4. DSet a CPU compute cluster in the workspace's network as the image build compute with az ml workspace update
Show the answer and why
  • AEnable the admin user on the container registry so that the default image build can authenticate to it

    Incorrect

    The failure is network reachability, not authentication; the admin user doesn't give the build a network path.

  • BLeave image building to the workspace's default serverless compute and add the registry's IP to its firewall

    Incorrect

    The default serverless build works only when the storage and registry aren't under network restrictions.

  • CMove the jobs to curated environments and install the extra packages at the start of each training script instead

    Incorrect

    That avoids the build but installs packages on every run, losing the cached, reproducible environment.

  • DSet a CPU compute cluster in the workspace's network as the image build compute with az ml workspace update

    Correct

    Serverless image builds only work when dependent resources aren't network-restricted; a cluster in the network can build the images.

By default Azure Machine Learning builds environment images on serverless compute, which works only when the workspace's storage account and container registry aren't behind private endpoints. With network restrictions, create a CPU compute cluster in the same network as those resources and set it as the image build compute, for example with az ml workspace update --image-build-compute. Curated environments are already cached, so they don't need a build.

Question 3 · choose 1

Version 3 of a data asset points at the wrong folder. Production pipelines consume version 2, and the team wants future users to stop picking version 3. What should it do?

  1. ACreate version 4 with the correct path and archive version 3
  2. BEdit the path of version 3 so that it points at the correct folder
  3. CDelete version 3 so that the latest version reverts to version 2
  4. DArchive all versions of the asset and re-register it under a new name
Show the answer and why
  • ACreate version 4 with the correct path and archive version 3

    Correct

    Versions are immutable, so a new version fixes the path, and archiving hides version 3 from lists.

  • BEdit the path of version 3 so that it points at the correct folder

    Incorrect

    A data asset version can't be modified after it's created.

  • CDelete version 3 so that the latest version reverts to version 2

    Incorrect

    Data asset versions can't be deleted.

  • DArchive all versions of the asset and re-register it under a new name

    Incorrect

    Archiving every version hides version 2 as well, which production pipelines use.

A data asset version is immutable: it can't be modified or deleted, which protects jobs and lineage that use it. To correct a wrong path, create a new version under the same name with the right path. Archiving a version hides it from list queries and the studio listing, while workflows can still reference it.

Question 4 · choose 2

A team registers a training pipeline component in an Azure Machine Learning registry so that dev, test and prod workspaces in other subscriptions can run it. Which two statements are true? (Choose TWO.)

  1. AComponents and environments that the pipeline component references must be created in the registry first
  2. BThe registry can be renamed later if the pipeline component's sharing scope grows beyond the team
  3. CA data asset created in the registry keeps pointing at the original storage without copying it
  4. DUsers with the AzureML Registry User role can also create new registries
  5. EEach workspace that runs the pipeline must be in a region the registry supports
Show the answer and why
  • AComponents and environments that the pipeline component references must be created in the registry first

    Correct

    A registry supports only named assets, so referenced components and environments must exist there.

  • BThe registry can be renamed later if the pipeline component's sharing scope grows beyond the team

    Incorrect

    Registry names can't change after creation, because they're part of asset IDs.

  • CA data asset created in the registry keeps pointing at the original storage without copying it

    Incorrect

    Creating a data asset in a registry ingests a copy of the data into the registry's storage.

  • DUsers with the AzureML Registry User role can also create new registries

    Incorrect

    That role doesn't include creating or deleting registries.

  • EEach workspace that runs the pipeline must be in a region the registry supports

    Correct

    The workspace's region must be in the registry's list of supported regions.

Registries hold named models, environments, components and data assets for every workspace in the organization, across subscriptions. To reference a component or environment from a pipeline component in a registry, create it in the registry first, and run the job only in workspaces whose region the registry supports. Registry names are fixed, data assets created in a registry are copied into its storage, and AzureML Registry User can't create registries.

Question 5 · choose 1

A team writes a table definition for an mltable data asset. What must the definition file be called?

  1. AMLTable, with no file extension
  2. BMLTable.yaml, like other YAML definitions
  3. Ctable.yml, referenced from the data asset
  4. DAny name, as long as the type is mltable
Show the answer and why
  • AMLTable, with no file extension

    Correct

    Azure Machine Learning expects a file named MLTable.

  • BMLTable.yaml, like other YAML definitions

    Incorrect

    Renaming it MLTable.yaml isn't supported.

  • Ctable.yml, referenced from the data asset

    Incorrect

    The folder must contain a file named MLTable.

  • DAny name, as long as the type is mltable

    Incorrect

    The file name is fixed.

An mltable data asset points to a folder that contains a valid MLTable file. The data assets article says not to rename the MLTable file to MLTable.yaml or MLTable.yml, because Azure Machine Learning expects a file named MLTable.

Question 6 · choose 1

A job should always use the newest version of a curated scikit-learn environment. How should it reference the environment?

  1. Aazureml://registries/<company-registry>/environments/<curated-name>/labels/latest
  2. Bmcr.microsoft.com/<curated-name>:latest as a custom image
  3. Cazureml://registries/azureml/environments/<curated-name>/labels/latest
  4. DA custom environment rebuilt from the curated environment's Dockerfile
Show the answer and why
  • Aazureml://registries/<company-registry>/environments/<curated-name>/labels/latest

    Incorrect

    Curated environments are hosted in the azureml registry, not in your own registry.

  • Bmcr.microsoft.com/<curated-name>:latest as a custom image

    Incorrect

    That points at a container image, not the curated environment asset.

  • Cazureml://registries/azureml/environments/<curated-name>/labels/latest

    Correct

    Curated environments are hosted in the azureml registry and can be referenced by the latest label.

  • DA custom environment rebuilt from the curated environment's Dockerfile

    Incorrect

    That creates a custom environment instead of referencing the curated one.

Curated environments are provided by Azure Machine Learning and hosted in the AzureML registry. You reference a specific version or the latest one with azureml://registries/azureml/environments/<curated-environment-name>/versions/<version> or .../labels/latest.

Question 7 · choose 1

All versions of an environment were archived. A team creates a new version under the same name. What happens?

  1. AThe new version is active, and the old versions are restored
  2. BThe new version is also archived and hidden from default lists
  3. CThe creation fails until someone restores the archived environment
  4. DThe archived versions are deleted to make room for it
Show the answer and why
  • AThe new version is active, and the old versions are restored

    Incorrect

    Creating a version doesn't restore archived ones.

  • BThe new version is also archived and hidden from default lists

    Correct

    New versions under an archived container are set as archived automatically.

  • CThe creation fails until someone restores the archived environment

    Incorrect

    Creation succeeds; the version is archived.

  • DThe archived versions are deleted to make room for it

    Incorrect

    Archiving doesn't delete versions.

Archiving an environment hides it from list queries by default, while workflows can still reference it. If you create a new environment version under an archived environment container, that version is automatically set as archived as well.

Question 8 · choose 1

Which three parts make up an Azure Machine Learning component?

  1. AModel; scoring script; endpoint configuration
  2. BDatastore; compute target; schedule
  3. CExperiment; run; metrics
  4. DMetadata; interface (inputs and outputs); command, code and environment
Show the answer and why
  • AModel; scoring script; endpoint configuration

    Incorrect

    Those describe a deployment, not a component.

  • BDatastore; compute target; schedule

    Incorrect

    Those are workspace resources a pipeline uses.

  • CExperiment; run; metrics

    Incorrect

    Those describe tracking, not a component definition.

  • DMetadata; interface (inputs and outputs); command, code and environment

    Correct

    These are the three parts of a component.

A component is a self-contained piece of code that does one step in a pipeline. It consists of metadata (name, display name, version, type), an interface (input and output specifications), and the command, code and environment that run it.

Practice domain 1 →Practice all domains →