Creating an Azure Machine Learning Instance
Tags: azure, machinelearning, beginners, datascience
Published: 2022-04-21 16:57:49

---
title: Creating an Azure Machine Learning Instance
published: true
description: Going from zero to a functioning machine learning instance on Azure
tags: Azure, MachineLearning, Beginners, DataScience
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h65h9fp2naltz4an35iy.png
canonical_url: https://accessibleai.dev/post/azureml/
series: Azure Machine Learning
---

In this article we'll take a high-level look at the Azure Machine Learning service and give you a step-by-step guide to creating a machine learning instance. We'll also touch on some pricing concerns and give you a high-level picture of the types of things the Machine Learning service and the accompanying Azure Machine Learning Studio (AMLS) can do.

*This content is also available in video form on [YouTube](https://www.youtube.com/watch?v=9Ijun9V2g10)*
{% youtube 9Ijun9V2g10 %}

## Pre-Requisites

You'll need an Azure account that you can log into the [Azure Portal](https://portal.azure.com) in order to create a machine learning instance.

If you don't have an Azure account yet, I recommend you [create a free Azure account](https://azure.microsoft.com/en-us/free/). You can only do this once and only as your first Azure account (something I personally missed out on), but it gives you 12 months of free services plus a $200 credit for anything premium in the first month.

The rest of this article assumes you have a functioning Azure account and access to the Azure portal.

## Creating an Azure Machine Learning Studio Instance

First, go to [the Azure portal](https://portal.azure.com/#home) and click "Create a resource".

![Create a Resource](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f095vd2oka7ce9xdvui8.png)

Next click on the "AI + Machine Learning" category in the sidebar and then select "Create" under "Machine Learning".

![Create a Machine Learning Resource](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lz0vd2l41mx2oocgkcq5.png)

This will start the process of creating a machine learning instance.

## Configuring the Machine Learning Instance

Before the machine learning instance can be created, you need to give it a few pieces of information and review its configuration.

There are a number of things going on with this page so let's go over them one by one:

![Configure the Machine Learning Resource](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/njjfqnixyjfqvvfebwdh.png)

First, all Azure resources must be placed in a resource group to organize related resources. While you *can* re-use an existing resource group, I recommend creating a new resource group just for machine learning resources. This helps clarify the intent of other services that Azure may create for you for machine learning tasks and also gives you an easy way to delete all machine learning resources by deleting the entire resource group. This can be useful for experimenting with things and then deleting anything unused to prevent accidental recurring charges.

> **Important note:** While the Machine Learning instance is free as of the time of this writing, other resources such as a container registry may have charges associated with them. Always check the [pricing calculator](https://azure.microsoft.com/en-us/pricing/calculator/) before creating a resource and proactively monitor the Azure Cost Management. See [Microsoft's article on best practices for cost management](https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/cost-mgt-best-practices) for more details.
> 
> If you want automated machine learning without Azure or without any expenses, you might also [consider ML.NET](https://accessibleai.dev/post/ml_net_tasks/) which uses many of the same innovations but requires programming knowledge.

Secondly, you need to give your workspace a unique name. Thankfully, this unique name is only unique within the resource group you're using and is not something that must be unique across all users using Azure.

Next, verify the region of your machine learning resource. I'd recommend picking a region close to your geographical location.

Azure needs to create three distinct resources for your machine learning instance: 

1. a storage account to hold model data and notebook files
2. a key vault to store sensitive information securely
3. an application insights resource to monitor deployed models
 
I recommend creating a new instance of each of the three of these resources.

Azure also wants a container registry for your machine learning instance, however this is a paid resource and is not necessary unless you are deploying a model. Once you deploy a model, Azure will automatically create a container registry if it needs one. For this reason, I recommend leaving container registry set to "None".

Finally, click "Review + Create"

Azure will validate that your configuration is valid and prompt you to confirm all of your settings here.

![Confirm the Machine Learning Resource configuration](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3266ra14zkz5pcpsppfp.png)

Go ahead and click "Create" once you are satisfied with your configuration.

Azure will now create your resource. This usually takes two minutes, but may take longer depending on the time of day or other factors.

Once your resource has been created, click "Go to Resource" to go to the new machine learning instance.

## Machine Learning Instance

Once your resource has been created, you should see something similar to the following image:

![The Machine Learning Resource](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iqy5btx84yjg7xyeft94.png)

This interface is very similar to the interface used by other Azure resources such as an App Service and while it may look intimidating initially, there's actually not a lot for us to do here.

Before we move on, I want to point out the "Download config.json" button (labelled with 1 in the image above). This button lets you get a configuration file that will be helpful if you want to use the Azure ML SDK in the future (stay tuned for future content on this topic). For now we don't need it, but keep in mind where this button is.

Next, let's click "Launch studio" to leave the Azure portal and enter the Azure Machine Learning Studio.

## Azure Machine Learning Studio

Azure Machine Learning Studio (AMLS) is the central place for data science tasks on Microsoft Azure.

![Azure Machine Learning Studio](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fd93m683gf0dnm3ykqgg.png)

It has a few major features:

- A featured area allowing you to quickly interact with the major parts of AMLS
- Recent resources, documentation, and learning materials
- A sidebar containing the major navigational points of interest
  
Going over the machine learning studio user interface is beyond the scope of this article, but look forward to future content to provide a guided tour.

## What can you do with Azure Machine Learning Studio?

At a high level, Azure Machine Learning Studio lets you do the following things:

- Run data science experiments
- View past experiments, the models they produced, and the performance of those models
- Deploy trained models to endpoints for batch or realtime processing
- Monitor deployed models
- Track and store datasets
- Manage computational resources
- Interact with [Jupyter notebooks](https://accessibleai.dev/post/anaconda/) in a cloud environment

On top of that, Azure Machine Learning Studio is built for a variety of users from expert data scientists to those brand new to data science.

There are three major ways of running data science experiments on Azure:

1. Via the Azure ML SDK in Python or R
2. Via the drag-and-drop designer
3. Via Azure Automated ML (Auto ML)

These three approaches have a differing level of skills required for each one of them.

### Automated ML

Those without deep data science knowledge can use Automated ML to create and run experiments without requiring knowledge of various machine learning algorithms, the hyperparameters they require, or the mechanics of splitting training and verification data.

![Automated ML](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rcylteabw0oftd6n1w9h.png)

The result of these experiments identifies the optimal algorithm and parameter set given the data and experiment parameters the user provided.

![Results from an Automated ML experiment](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3lgeks1mrt7dskv9p5w0.png)

### Machine Learning Designer

The designer allows people familiar with machine learning routines to use a no code or low code approach to creating and running machine learning experiments using AMLS.

![The Designer for a Classification Experiment](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zmfc552o9hkuxffk520d.png)

The designer does assume the user knows the basics of normalizing, feature engineering, splitting data for training, and selecting an algorithm for training. However, help is provided in the interface.

It's also worth noting that you can provide custom R or Python code in dedicated nodes for this on the designer.

### Azure ML SDK

The Azure ML SDK allows those familiar with Python or R to run machine learning experiments on the cloud or using their own hardware and store the results in experiments on Azure.

![Python code working with the Azure SDK](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/28o5azr0ajut4ophd7au.png)

Even if you use your own compute resources outside of Azure, you can still take advantage of Azure's storage and visualization features to track experiments over time and deploy models to endpoints.

![Tracking a ML Experiment](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w0t5qjavl68s8n090vgh.png)

## Next Steps

Okay, now that you've seen what Azure ML Studio is and how to create one you're likely wanting to go a little deeper.

You can expect a wide variety of additional content around Azure ML Studio in future articles and videos. Check back at [AccessibleAI.dev](https://AccessibleAI.dev) for more articles in the future and [subscribe to the YouTube channel](https://www.youtube.com/channel/UCtzmz6BfJqDx-8IHkh6ovwA) for more video content in the future.

Microsoft offers an amazing array of interactive tutorials on [Microsoft Learn](https://docs.microsoft.com/en-us/learn/browse/?WT.mc_id=azureml_tutorials) that are worth investigating as well.