First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.
Continue in the practice tool above to load more questions, 50 at a time.
Question 1Design and prepare a machine learning solution
Which Azure resource is the top-level container for experiments, models, environments, and compute targets in Azure Machine Learning?
- A key vault
- A workspace Correct answer.
- A container registry
- A storage account
Explanation
The workspace is the Azure resource that groups together all machine learning artifacts and the compute targets used to run them. Storage, key vault, and container registry are dependent resources linked to the workspace rather than the container itself.
Question 2Design and prepare a machine learning solution
Which compute target runs training scripts and can automatically scale from zero to a defined maximum number of nodes?
- A compute cluster Correct answer.
- An attached Synapse Spark pool
- A Kubernetes inference cluster
- A compute instance
Explanation
A compute cluster is a managed multi-node training target that supports autoscaling between minimum and maximum node counts, including scaling to zero when idle. A compute instance is a single-user development machine, and inference clusters are used for scoring endpoints.
Question 3Design and prepare a machine learning solution
Which default datastore in a newly provisioned workspace stores job outputs such as logs and metrics?
- workspaceartifactstore Correct answer.
- workspacefilestore
- workspaceadlsstore
- workspaceblobstore
Explanation
Each new workspace is provisioned with an artifact datastore that holds run outputs, logs, and snapshots. The blob and file datastores hold user data, and no ADLS datastore is created by default.
Question 4Design and prepare a machine learning solution
Which linked service stores secrets such as storage account keys and connection strings used by an Azure Machine Learning workspace?
- Azure Application Insights
- Azure Key Vault Correct answer.
- Azure Storage account
- Azure Container Registry
Explanation
Key Vault is the linked service that holds credentials and secrets referenced by the workspace. Storage, container registry, and application insights are linked for data, images, and monitoring respectively.
Question 5Design and prepare a machine learning solution
Which built-in Azure role lets a user create and manage resources in a workspace but not grant access to other users?
- Contributor Correct answer.
- Owner
- User Access Administrator
- Reader
Explanation
Contributor permits creating and managing resources but does not include the ability to assign roles. Owner and User Access Administrator both include permission management.
Question 6Design and prepare a machine learning solution
Which data asset type should you use for a collection of image files that are several terabytes in size and must be streamed during training?
- A tabular data asset
- A registered model
- A file data asset (URI file) Correct answer.
- An environment
Explanation
A file data asset references files by URI and can be mounted or streamed, which suits large unstructured data such as images. Tabular data assets are intended for schema-bearing delimited data.
Question 7Design and prepare a machine learning solution
Which compute target provides a managed, preconfigured cloud development environment for authoring notebooks?
- A compute cluster
- An Azure Kubernetes Service cluster
- An attached HDInsight cluster
- A compute instance Correct answer.
Explanation
A compute instance is a managed single-node VM intended for interactive authoring in notebooks and IDE integrations. Compute clusters and Kubernetes targets are used for training runs and scoring rather than authoring.
Question 8Design and prepare a machine learning solution
An Azure Machine Learning environment primarily specifies which two elements needed to run a script?
- A workspace and a compute target
- A Docker image and a set of Python dependencies Correct answer.
- A storage account and a datastore
- A model and a data asset
Explanation
An environment combines the base image (or build context) with the Python and system packages required by the code. Compute and data are configured on the job, not inside the environment.
Question 9Design and prepare a machine learning solution
You define a compute cluster with min_nodes of 0, max_nodes of 4, and idle_time_before_scale_down of 180 seconds. A training job runs for 30 minutes and then completes. What happens to the nodes?
- The cluster scales down to one node and keeps it running.
- The nodes are deallocated the moment the job completes.
- The nodes stay allocated because min_nodes is set to zero.
- After 180 seconds of inactivity the cluster scales down to zero nodes. Correct answer.
Explanation
The idle timer starts when no jobs are running, so nodes are released after the configured idle period and the cluster returns to its minimum node count of zero. Scale-down is not instantaneous at job completion.
Question 10Design and prepare a machine learning solution
You must create a datastore that reads from Azure Blob Storage without storing an account key anywhere in the workspace. What should you use?
- Identity-based authentication using a managed identity Correct answer.
- A SAS token embedded in the datastore definition
- The storage account key retrieved from the key vault
- Anonymous public read access to the container
Explanation
Identity-based (credential-less) authentication lets the workspace's managed identity access storage through Azure RBAC, so no secret is persisted. Keys and SAS tokens are stored credentials that the requirement excludes.
Question 11Design and prepare a machine learning solution
You register a data asset named raw-sales, then register a different file path under the same name. What is the result in the workspace?
- A new version of the raw-sales data asset is created. Correct answer.
- The registration fails because data asset names must be unique.
- The existing asset is overwritten in place.
- A separate asset with a randomized suffix is created.
Explanation
Data assets are versioned by name, so re-registering the same name with different content produces the next version while earlier versions remain available. Overwriting or failing would break reproducibility of past jobs.
Question 12Design and prepare a machine learning solution
You are preparing data for a regression model and will apply a normalization scaler. Where should the split occur to avoid data leakage?
- Fit separate scalers on the training and test sets
- Split the data first, then fit the scaler on the training set only Correct answer.
- Fit the scaler on the test set, then apply it to the training set
- Fit the scaler on all data, then split into train and test
Explanation
Any transformation that learns parameters must be fitted on training data only and then applied to the test set, otherwise information from the test set leaks into training. Fitting on the full dataset or on the test set biases evaluation.
Question 13Design and prepare a machine learning solution
Which value should be assigned to the MLflow tracking URI so that MLflow logs metrics and artifacts into an Azure Machine Learning workspace?
- The workspace's key vault URI
- The workspace's blob storage endpoint
- The workspace's azureml:// MLflow tracking URI Correct answer.
- The workspace's container registry login server
Explanation
The workspace exposes a dedicated MLflow tracking URI of the form azureml://<region>.api.azureml.ms/mlflow/v1.0/subscriptions/..., which routes experiments and artifacts into the workspace. Storage and registry endpoints serve different purposes.
Question 14Design and prepare a machine learning solution
A training dataset contains a numeric column that you want to predict. Which automated machine learning task should you select?
- Forecasting
- Image classification
- Regression Correct answer.
- Classification
Explanation
Regression predicts a continuous numeric target from feature columns. Classification predicts discrete labels, and forecasting predicts a future time series.
Question 15Design and prepare a machine learning solution
In an Azure Machine Learning CLI v2 command job YAML, which key specifies the script to execute along with its arguments?
- inputs
- compute
- command Correct answer.
- environment
Explanation
The command key holds the shell command line, including the script name and any arguments passed to it. The environment, compute, and inputs keys configure runtime context and data bindings instead.
Question 16Design and prepare a machine learning solution
Which compute target should host a real-time inference service that must scale out across multiple pods?
- An Azure Kubernetes Service inference cluster Correct answer.
- An attached Azure Databricks cluster
- A compute instance used for notebook authoring
- A training compute cluster
Explanation
Managed online endpoints and AKS inference clusters scale replicas across pods to serve real-time requests. Compute instances and training clusters are not designed for hosting scoring services.
Question 17Design and prepare a machine learning solution
Which statement correctly distinguishes a datastore from a data asset?
- A data asset holds connection info to a storage service; a datastore references specific data and is versioned.
- A datastore holds connection info to a storage service; a data asset references specific data and is versioned. Correct answer.
- Both reference specific data, but only the data asset stores credentials.
- Both hold storage connection info, but only the datastore is versioned.
Explanation
A datastore is an abstraction over a storage service containing the endpoint and authentication details. A data asset is created on top of a datastore and points to a specific path or file set with its own version history.
Question 18Design and prepare a machine learning solution
Using the Azure Machine Learning Python SDK v2, which class do you instantiate to connect to an existing workspace and submit jobs?
- Job
- Workspace
- Datastore
- MLClient Correct answer.
Explanation
MLClient is the SDK v2 entry point that authenticates to a subscription and workspace and exposes operations for jobs, data, models, and compute. The Workspace class belongs to the older SDK v1 control-plane model.
Question 19Design and prepare a machine learning solution
Which Azure Machine Learning capability compares a model's production input distribution against the training distribution over time?
- Dataset monitoring for data drift Correct answer.
- Compute cluster autoscaling
- The responsible AI dashboard
- Automated machine learning
Explanation
Dataset monitors track drift by comparing statistics of recent production data with a baseline dataset. AutoML builds models and the responsible AI dashboard explains model behavior, but neither tracks distribution changes.
Question 20Design and prepare a machine learning solution
When configuring an automated machine learning job, which setting controls whether missing values are imputed and categorical columns are encoded automatically?
- primary_metric
- featurization Correct answer.
- limits
- training_data
Explanation
The featurization setting selects automatic preprocessing such as imputation and one-hot encoding, and can also be turned off or customized. The other settings control scoring, data binding, and job timeouts.
Question 21Design and prepare a machine learning solution
You must ensure a workspace can only be reached from inside a virtual network and has no public internet access. Which configuration is required?
- An IP firewall rule allowing only the corporate public IP range
- A service endpoint on the workspace's storage account only
- A network security group on the compute cluster subnet
- A private endpoint for the workspace with public network access disabled Correct answer.
Explanation
Private endpoints place the workspace and its dependent resources on a private IP inside the virtual network, and disabling public network access removes internet reachability. Securing only storage or compute leaves the workspace control plane publicly exposed.
Question 22Design and prepare a machine learning solution
You want jobs on a compute cluster to authenticate to storage by using the identity of the user who submitted the job. What should you enable?
- User identity passthrough on the compute cluster Correct answer.
- A system-assigned managed identity on the workspace
- Anonymous access on the storage container
- A SAS token embedded in the job YAML
Explanation
User identity passthrough causes jobs to authenticate with the submitting user's Entra ID token, so storage RBAC assignments for that user apply directly. Workspace managed identity authenticates as the workspace itself, not as the submitter.
Question 23Design and prepare a machine learning solution
A job reads a very large file data asset, and you must avoid copying the full dataset to the compute node's local disk. Which data access mode should you use?
- download
- ro_mount Correct answer.
- direct
- eval_download
Explanation
ro_mount streams files from storage on demand through a read-only mount, so the entire asset is never copied to local disk. Download modes materialize the full dataset locally before the script starts.
Question 24Design and prepare a machine learning solution
Every training job in a workspace must use identical Python package versions, including a private wheel file. What should you create?
- A compute instance with the packages preinstalled
- A curated environment from the registry
- An AutoML experiment with featurization enabled
- A registered custom environment that includes the wheel Correct answer.
Explanation
A custom environment captures the exact base image, dependencies, and build context, and registering it makes the identical definition reusable by every job. Curated environments cannot include private packages, and installing packages on a compute instance does not travel with the job.
Question 25Design and prepare a machine learning solution
A training job runs on low-priority nodes and must tolerate node preemption. Which practice is required?
- Write checkpoints so the run can resume after preemption Correct answer.
- Set idle_time_before_scale_down to 30 minutes
- Enable user identity passthrough on the compute cluster
- Configure min_nodes equal to max_nodes on the cluster
Explanation
Low-priority nodes can be reclaimed at any time, so the script must persist progress and be able to restart from a checkpoint. Idle timeouts and node counts affect cost and availability but do not make a preempted run recoverable.
Question 26Design and prepare a machine learning solution
Which Azure resource acts as the top-level container that holds experiments, compute targets, data assets, and registered models in Azure Machine Learning?
- An Azure Container Registry instance
- An Azure Machine Learning workspace Correct answer.
- A resource group
- An Application Insights instance
Explanation
The workspace is the top-level Azure Machine Learning resource; every experiment, compute target, data asset, environment, and model registration belongs to exactly one workspace. The other resources are either Azure-scoping containers or workspace dependencies that provide specific supporting services.
Question 27Design and prepare a machine learning solution
Which Azure Machine Learning studio capability lets you build a pipeline by dragging prebuilt modules onto a canvas and connecting them without writing code?
- Designer Correct answer.
- Prompt flow
- Notebooks
- Automated ML
Explanation
Designer is the visual authoring surface where prebuilt modules are connected on a canvas and executed as a pipeline job. The other features either generate models automatically, run code authored by you, or orchestrate LLM prompts.
Question 28Design and prepare a machine learning solution
You need to connect an Azure Machine Learning workspace to an existing Azure SQL database so jobs can read tables from it. Which datastore type should you create?
- Azure Files share
- Azure Data Lake Storage Gen2
- Azure Blob Storage
- Azure SQL database Correct answer.
Explanation
The datastore type must match the storage service being connected; an Azure SQL database datastore is the type that targets a SQL server and database. Blob, Files, and Data Lake Gen2 datastores all target storage accounts rather than relational databases.
Question 29Design and prepare a machine learning solution
Which job type should you submit to run a hyperparameter search that trains many trials from a search space?
- Pipeline job
- Automated ML job
- Command job
- Sweep job Correct answer.
Explanation
A sweep job defines a search space, a sampling algorithm, and an objective metric, and it launches one trial per sampled configuration. A command job runs a single script, a pipeline job orchestrates components, and an AutoML job selects algorithms and preprocessing automatically.
Question 30Design and prepare a machine learning solution
You want an environment defined by an explicit list of Conda and pip dependencies. Which file should the environment reference?
- A Conda YAML file such as conda.yml Correct answer.
- An MLTable YAML file
- A Dockerfile
- A requirements.txt file only
Explanation
A Conda YAML file declares the Conda channels, Conda packages, and a pip section, which Azure Machine Learning uses to build the environment image. A requirements.txt file can only list pip packages and cannot express Conda dependencies on its own.
Question 31Design and prepare a machine learning solution
Which identity does a newly created Azure Machine Learning workspace use by default to access the storage account and other linked resources?
- A shared access signature token stored in Key Vault
- A system-assigned managed identity created together with the workspace Correct answer.
- A service principal that you create manually
- A user-assigned managed identity that you attach
Explanation
When a workspace is created, Azure creates a system-assigned managed identity for it and grants that identity roles on the linked resources. This identity is managed by Azure and requires no credentials to be stored or rotated by you.
Question 32Design and prepare a machine learning solution
You register an environment named sklearn-env at version 3 and later register version 4 under the same name. A job YAML references azureml:sklearn-env:3. Which environment does the job use?
- Version 4, because it is the latest
- The job fails because only one version may exist at a time
- Version 3, because the reference is pinned to a specific version Correct answer.
- Version 4, but only if version 3 was deleted
Explanation
Environment references of the form name:version resolve to that exact immutable version, so registering a newer version does not change existing jobs. This pinning is what makes job runs reproducible.
Question 33Design and prepare a machine learning solution
By default, where does an Azure Machine Learning workspace keep registered model artifacts and job outputs?
- In Azure Container Registry
- In the workspace's default storage account, exposed as the default datastore Correct answer.
- In the workspace's Application Insights resource
- In Azure Key Vault
Explanation
Each workspace is created with a default storage account, and the default datastore on that account receives job outputs and model artifacts. The container registry stores images, Key Vault stores secrets, and Application Insights stores telemetry.
Question 34Design and prepare a machine learning solution
Before a command job can run in a workspace, what must exist?
- An Azure Kubernetes Service cluster
- A datastore with at least one registered data asset
- A registered model
- A compute target configured in the workspace, such as a compute cluster Correct answer.
Explanation
Every job needs somewhere to execute, so a compute target must be available and referenced by the job definition. Models are outputs of training, and data assets are optional if the script obtains its input another way.
Question 35Design and prepare a machine learning solution
A sweep job must try every combination of three learning-rate values and two batch sizes exactly once. Which sampling algorithm should you choose?
- Uniform sampling
- Random sampling
- Grid sampling Correct answer.
- Bayesian sampling
Explanation
Grid sampling enumerates the product of the discrete choices, so each combination is tried once. Random and Bayesian sampling select configurations probabilistically and can repeat or skip combinations.
Question 36Design and prepare a machine learning solution
A sweep job must stop a trial when its primary metric falls outside a specified slack amount from the best trial, evaluated at a set interval. Which early termination policy should you configure?
- Truncation selection policy
- No early termination policy
- Median stopping policy
- Bandit policy Correct answer.
Explanation
The Bandit policy compares a trial's metric against the best trial's metric with an allowed slack amount and evaluates at a configured interval, terminating trials that fall too far behind. Median stopping compares against the median of running trials, and truncation selection cancels the lowest-performing percentage.
Question 37Design and prepare a machine learning solution
Which Python decorator converts an ordinary Python function into a reusable, registered component for a pipeline in the Azure Machine Learning SDK v2?
- @command_component Correct answer.
- @pipeline
- @dsl.pipeline
- @register
Explanation
The command_component decorator turns a function into a command component that can be reused and shared across pipeline jobs. The pipeline decorators assemble components into a workflow rather than defining a component.
Question 38Design and prepare a machine learning solution
A training script must write processed files back to the storage location of a folder data asset while the job runs, without copying the whole folder to local disk first. Which data access mode should the input use?
- rw_mount Correct answer.
- direct
- download
- ro_mount
Explanation
rw_mount exposes the data asset as a read-write mount point, so writes made by the script are persisted back to the underlying storage. ro_mount is read-only and download and direct modes do not provide a write-back mount.
Question 39Design and prepare a machine learning solution
Which automated machine learning job setting caps the total wall-clock time for the entire automated ML experiment?
- limits.timeout_minutes Correct answer.
- limits.max_trials
- limits.max_concurrent_trials
- limits.trial_timeout_minutes
Explanation
timeout_minutes bounds the whole automated ML job, while trial_timeout_minutes bounds each individual training trial. max_trials and max_concurrent_trials limit counts rather than elapsed time.
Question 40Design and prepare a machine learning solution
Code running on your local workstation must open a browser window and prompt you to sign in interactively to the workspace. Which credential class should you use?
- EnvironmentCredential
- ManagedIdentityCredential
- AzureCliCredential
- InteractiveBrowserCredential Correct answer.
Explanation
InteractiveBrowserCredential launches an interactive sign-in flow in a browser, which is the behavior described. Managed identity applies to Azure-hosted compute, AzureCliCredential reuses an existing CLI session without prompting, and EnvironmentCredential reads service principal values from environment variables.
Question 41Design and prepare a machine learning solution
Which definition is required to create a reusable command component that other jobs and pipelines can reference?
- A component YAML that declares type: command along with code and environment Correct answer.
- A Dockerfile placed in the code folder
- An .amlignore file
- A registered model in the workspace
Explanation
A command component is described by a YAML document that sets type: command and references the code location, the command string, and the environment. Dockerfiles, ignore files, and models are supporting artifacts but are not component definitions.
Question 42Design and prepare a machine learning solution
Component A of a pipeline produces a directory of processed files that component B mounts as input. Which output type should component A declare for that output?
- mltable
- uri_file
- integer
- uri_folder Correct answer.
Explanation
A uri_folder output represents a directory, which is the correct type when downstream components consume a whole folder of files. uri_file represents a single file and mltable represents tabular data with a schema.
Question 43Design and prepare a machine learning solution
A pipeline must run every night at 02:00 without manual submission. Which Azure Machine Learning construct should you create?
- An AutoML job
- A schedule attached to the job or pipeline Correct answer.
- A sweep job
- A registered component
Explanation
Schedules associate a recurrence or trigger with a job or pipeline definition so that runs start automatically. Components, sweep jobs, and AutoML jobs describe work but do not by themselves provide a recurrence.
Question 44Design and prepare a machine learning solution
Using the Azure Machine Learning SDK v2, which client call registers a trained model file into the workspace?
- ml_client.models.create_or_update Correct answer.
- ml_client.jobs.create_or_update
- ml_client.data.create_or_update
- ml_client.compute.begin_create_or_update
Explanation
Model registration is performed through the models collection of the MLClient, which accepts a model object pointing at the artifact path. The jobs, compute, and data collections manage different asset types.
Question 45Design and prepare a machine learning solution
A command job on a compute cluster fails with an authorization error when reading a datastore that uses credential-less, identity-based authentication. The cluster has no identity configured. What should you do?
- Copy the data to the node's local disk before training
- Recreate the datastore with an account key
- Add the submitting user to the cluster's node list
- Assign a managed identity to the compute cluster and grant it a data-plane role on the storage account Correct answer.
Explanation
With credential-less datastores, the identity of the compute that runs the job must have a role assignment on the storage account. Attaching a managed identity to the cluster and granting a storage data role, such as Storage Blob Data Reader, fixes the authorization failure.
Question 46Design and prepare a machine learning solution
Compute nodes inside a virtual network cannot resolve the fully qualified domain name of a storage account's private endpoint. What must be deployed to fix the name resolution?
- A NAT gateway
- A public IP address on the compute cluster
- A service endpoint on the storage account
- A private DNS zone linked to the virtual network that contains the privatelink record Correct answer.
Explanation
Private endpoints require DNS records that map the storage FQDN to the private IP, and those records live in an Azure private DNS zone linked to the virtual network. Without that zone, nodes resolve public addresses or fail resolution entirely.
Question 47Design and prepare a machine learning solution
The command az ml job create --file job.yml is used from a terminal. Which statement describes what this CLI v2 command does?
- It validates job.yml but never submits it
- It downloads the outputs of a previously submitted job
- It submits the job defined in job.yml to the workspace Correct answer.
- It runs job.yml as a local Python script
Explanation
az ml job create with the --file flag reads the YAML job definition and submits it to the workspace specified by the CLI configuration. Validation occurs as part of submission, but the primary effect is the creation of the job.
Question 48Design and prepare a machine learning solution
An environment and a component must be reused by three separate workspaces in the same region. Where should you register them?
- In a Git repository only, with no registration
- In an Azure Machine Learning registry, referenced by name and version Correct answer.
- Separately in each of the three workspaces
- In a public container registry
Explanation
Registries are workspace-independent stores for environments, components, and models, so assets registered once can be referenced by name and version from any workspace with access. Duplicating registrations per workspace creates drift and extra maintenance.
Question 49Design and prepare a machine learning solution
A job must read delimited text files with a declared column schema and typed column conversions applied at read time. Which data asset type should you use?
- A registered model
- mltable Correct answer.
- uri_file
- uri_folder
Explanation
An mltable data asset carries an MLTable specification that declares the schema and transformations applied when the data is read, so downstream code receives typed columns. uri_file and uri_folder only point at locations and leave parsing to the script.
Question 50Design and prepare a machine learning solution
A compute cluster must pull a custom training image from a private Azure Container Registry that is not attached to the workspace. What must you configure?
- Make the registry publicly accessible
- Grant the cluster's managed identity the AcrPull role on the registry Correct answer.
- Place the registry admin password in the job YAML
- Append a SAS token to the image name
Explanation
Pulling from a private registry requires the pulling identity, here the cluster's managed identity, to hold the AcrPull role on that registry. Embedding credentials in job definitions or exposing the registry publicly are insecure and unnecessary.