Understanding the Azure Machine Learning Workspace
This lesson explains what a workspace contains, which Azure resources it depends on, which tools manage it, and how workspaces are organized across environments.
Learning outcomes
After completing this lesson, you will be able to:
- Describe the assets and resources a workspace holds.
- Identify the dependent resources created with a workspace.
- Distinguish CLI v2 and SDK v2 from the retired v1 tools.
- Explain how workspaces are separated by environment.
What a workspace contains
An Azure Machine Learning workspace is the central place for a team's machine learning work. It keeps the record of every job that has run, with its logs, metrics and outputs, and it stores the reusable assets that jobs use and produce: data assets, environments, components and models. It also hosts compute targets and endpoints that serve models.
- Assets: data assets, environments, components and models, each named and versioned.
- Jobs: command, sweep, automated ML and pipeline jobs, with their run history.
- Compute: compute instances, compute clusters and attached Kubernetes clusters, plus serverless compute.
- Endpoints: managed online endpoints and batch endpoints with their deployments.
- Connections and datastores: links to storage and other services.
Azure Machine Learning also supports a hub workspace kind, which shares settings with child project workspaces and was used by the classic Foundry portal. The machine learning skills in this exam use the default workspace kind.
Dependent Azure resources
A workspace stores little itself. It relies on other Azure resources, which are created with the workspace or supplied by you. Knowing their roles helps in troubleshooting and in network design, because each of them must be reachable and protected.
| Resource | Purpose | Notes |
|---|---|---|
| Storage account | Default datastores, job artifacts, notebooks and logs | Holds workspaceblobstore and workspacefilestore |
| Key vault | Secrets such as datastore credentials and connection keys | Accessed by the workspace identity |
| Application Insights | Monitoring data for online endpoints | Optional at creation but recommended |
| Container registry | Docker images for environments | Can be created on demand when the first image is built |
The workspace's managed identity, system-assigned or user-assigned, accesses these resources on the workspace's behalf. Workspaces created after November 2024 grant their system-assigned identity the Azure AI Administrator role on the workspace by default. You can also bring existing resources, such as a storage account that complies with company policy, by passing their resource IDs at creation.
az ml workspace create --name mlw-churn-dev --resource-group rg-ml-dev \
--location swedencentral --display-name "Churn - development"Tools for working with a workspace
The exam expects fluency with the code-first tools, because they are what automation uses. All of them call the same Azure Resource Manager and workspace APIs, so an asset created with one is visible in the others.
- Azure CLI with the
mlextension (CLI v2):az mlcommands that create resources and submit jobs from YAML files, such asaz ml job create --file train.yml. - Python SDK v2 (
azure-ai-ml): anMLClientobject, authenticated withDefaultAzureCredential, whose operations such asml_client.jobs.create_or_update()do the same in code. - Azure Machine Learning studio: the web interface at
ml.azure.comfor browsing assets, comparing runs and viewing dashboards. - MLflow: the open-source tracking and model library, for which the workspace acts as a tracking server and model registry.
The older SDK v1 (azureml-core) and CLI v1 are retired: CLI v1 support ended on 30 September 2025, and SDK v1 support ended on 30 June 2026. New features exist only in v2, so new code and pipelines should use the v2 tools.
from azure.ai.ml import MLClient
from azure.identity import DefaultAzureCredential
ml_client = MLClient(DefaultAzureCredential(), subscription_id="SUBSCRIPTION_ID",
resource_group_name="rg-ml-dev", workspace_name="mlw-churn-dev")
for job in ml_client.jobs.list():
print(job.name, job.status)Organizing workspaces across environments
A single workspace for everything is simple, but it mixes experimental work with production endpoints under the same permissions and network rules. Most organizations therefore create one workspace per environment, such as development, test and production, often in different resource groups or subscriptions, and share approved assets between them through an Azure Machine Learning registry.
Some workspace settings cannot be changed easily after creation, such as customer-managed key encryption and, once enabled, managed virtual network isolation. Designing them up front, and creating workspaces from Bicep templates, avoids having to rebuild a workspace later.
Separating development from production
A retailer has one workspace in which data scientists experiment and from which production online endpoints are served. A data scientist recently deleted a production deployment by mistake. The company wants production protected while data scientists keep full freedom to experiment, and production must use exactly the models that were validated.
The design that meets every requirement is a separate production workspace, created from the same Bicep template, in which data scientists have at most Reader access and deployments are made by a release workflow's identity. Models validated in the development workspace are shared to an Azure Machine Learning registry, and the production workspace deploys them from there, so the exact validated version is used.
A resource lock on the endpoint would stop deletion but not other harmful changes, and it does not separate experiments from production. Giving data scientists a custom role without delete permissions in the shared workspace reduces risk but still mixes production with experimentation under one network and access model. Retraining the model in production would not guarantee that the validated model is the one deployed.
Which four Azure resources does a workspace depend on, and which one stores job outputs and uploaded data by default?
Show answer
A storage account, a key vault, Application Insights and a container registry (which can be created when first needed). The storage account holds the default datastores, including workspaceblobstore.
Exam Tips
Remember for the exam
- A workspace holds jobs, assets, compute, endpoints, datastores and connections.
- Dependencies: storage account, key vault, Application Insights and a container registry.
- Use CLI v2 (az ml) and SDK v2 (azure-ai-ml); v1 tools are retired.
- Separate workspaces per environment, with promotion through a registry.