Create Azure Compute Instance
This post is one section of the tutorial that provides a complete guide on how to bring your code to Azure cluster. This is suitable specially for advanced projects such as semantic segmentation and other deep learning projects.
Content of the tutorial:
- Create Azure Machine Learning Workspace
- Create Azure Compute Instance (this post)
- Create Azure Compute Cluster
- Create a Datastore
- Create Datasets
- Create a Virtual Environment
- Initialize and Experiment
- Submit and Run Experiment
- Common Errors and how to handle them
What is Azure Compute Instance?
Azure compute instance allows you to build and deploy models using integrated notebooks in Azure Machine Learning (AML) studio. The following applications can be used:
- Jupyter
- JupyterLab
- VS Code (preview)
- RStudio (preview)
This means that you can bring your training scripts to the AML studio instead of using your personal computer to train the model. However, there is a charge for using a compute instance depending on the type and the size of the virtual machine you choose, as we are going to see below.
Note that Azure Compute Instance is not the same as Azure Compute Cluster. The first is used as a replacement to your local environment. After closing the notebook, the training stops. Whereas the latter is used to submit the experiment to a remote GPU, which will train your model remotely and independently of your local machine or the compute instance.
Create Azure Compute Instance:
To create a compute instance, you should already have created a machine learning azure workspace. After that, you can follow the steps as illustrated on the following screenshots:
The virtual machine type and size can be chosen as desired depending on your specific needs. From financial perspective, it is better if you start with the cheapest if you are a total beginner, because you get charged per hour of running the compute cluster, not per actually using it.
The last step is to click on Create.
Now the compute instance is created and you can move your scripts to the notebook by clicking on the tool as shown below:
Important Note:
Note that, when the compute instance is running (i.e when it is on), it is charging as time passes, regardless of whether you are currently using it or not. Even if your computer is off, as long as the compute instance state says running, then you get charged. So, make sure you stop it when you no longer work on that day. You can start running it again when you come back next time.