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?
AGive the environment another new name and a higher version number, then submit the job again
BPin the numpy version it needs in the conda specification, which changes the environment hash
CSwitch the job to a curated environment with the same name prefix so the cache is bypassed
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.
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?
AEnable the admin user on the container registry so that the default image build can authenticate to it
BLeave image building to the workspace's default serverless compute and add the registry's IP to its firewall
CMove the jobs to curated environments and install the extra packages at the start of each training script instead
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.
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?
ACreate version 4 with the correct path and archive version 3
BEdit the path of version 3 so that it points at the correct folder
CDelete version 3 so that the latest version reverts to version 2
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.
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.)
AComponents and environments that the pipeline component references must be created in the registry first
BThe registry can be renamed later if the pipeline component's sharing scope grows beyond the team
CA data asset created in the registry keeps pointing at the original storage without copying it
DUsers with the AzureML Registry User role can also create new registries
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.
A team writes a table definition for an mltable data asset. What must the definition file be called?
AMLTable, with no file extension
BMLTable.yaml, like other YAML definitions
Ctable.yml, referenced from the data asset
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.
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.
All versions of an environment were archived. A team creates a new version under the same name. What happens?
AThe new version is active, and the old versions are restored
BThe new version is also archived and hidden from default lists
CThe creation fails until someone restores the archived environment
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.
Which three parts make up an Azure Machine Learning component?
AModel; scoring script; endpoint configuration
BDatastore; compute target; schedule
CExperiment; run; metrics
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.