Setting up AzureML workspace
Prerequisites
This module provides a walkthrough for setting up a new AML workspace. To run through the next sections, you will need an Azure subscription. See also instructions on how to create a workspace here.
Objectives
In this hands-on lab, you will learn how to:
- Setup AzureML workspace using UI
- Setup AzureML workspace using SDK
- Setup AzureML workspace using CLI
Create an AzureML workspace via Azure Portal UI
-
In you Azure portal navigate to ‘Create a resource’ and click
-
In ‘Azure Marketplace’ tab navigate to ‘AI + Machine Learning’ tab select ‘Machine Learning’ and click
-
Type a name for the workspace (default amlwstemp) and select (or create a new - default amlwstemp_rg) resource group, location and edition of the workspace (see details here). Click on ‘Review + Create’ and then ‘Create’
This process will create the following resources:
-
Wait for deployment and then click on ‘Go to resource’
-
In the resource blade, you have access to all the meta data needed to refer to your workspace e.g. name, resource group, etc. (you can download all these info as a json file, “config.json”). To access Azure Machine Learning Studio click on “Launch now”
This will take you to your Azure ML studio
Learn more about how to create and manage Azure Machine Learning workspaces in the Azure portal.
Setup AML workspace using CLI
Here we use a bash script for setting up an Azure ML workspace.
You can execute the below commands in any bash console. For simplicity you can use the embedded Azure Cloud Shell from your Azure portal
Execute the following commands:
Note: You can change PREFIX and LOCATION in create-env.sh (optional). Current script creates resources with prefix amlwstemp in westeurope region.
Note: If multiple users under same subscription and resource group are creating multiple workspaces during the workshop, edit ‘create-env.sh’ and add the $RANDOM element to the PREFIX. This will create resources with unique names for each user and avoids conflict name error.
- Clone Git repository
$ git clone https://github.com/Sahiep/aml-hands-on-lab
- Access 0-Setup/CLI/ folder
$ cd aml-hands-on-lab/0_setup/resources/
- Execute the bash script
$ . create-env.sh
As a result, following ressources will be deployed in your defined resource group
- Azure Key Vault
- Azure Machine Learning Workspace
- Azure Storage Account
- Azure Application Insights
-
Azure Container Registry
Learn more about how to create a workspace for Azure Machine Learning with Azure CLI.
Setup AzureML workspace using Python SDK
Python script for AzureML Workspace setup
Requirements
dotenv
azureml
azure [azure.common, azure.mgmt.resource, azure.mgmt.storage]
Setup
Execute the following command:
Note: You can change resource names and location in .env file.
- Clone Git repository
$ git clone https://github.com/Sahiep/aml-hands-on-lab
- Access SDK folder
$ cd aml-hands-on-lab/0_setup/resources/
- Execute the Python script
$ . python create-env.py
As a result, following ressources will be deployed in your defined resource group
- Azure Key Vault
- Azure Machine Learning Workspace
- Azure Storage Account
-
Azure Application Insights