Get Started With Azure Machine Learning Services

Purpose

This article shows you how to:

  1. Create service accounts for Azure Machine Learning services
  2. Install and log in to Azure Machine Learning Workbench
  3. Create a project in Workbench
  4. Run a Python Script
  5. Access the command-line interface (CLI)

Prerequisites

You would require:

  • Azure subscription with adequate permissions. If you don’t have an Azure subscription, create a free account before you begin.
  • Windows 10 or Windows Server 2016 or macOS Sierra or High Sierra for installing machine Learning Workbench.

Create service accounts for Azure Machine Learning services

Provision your Azure Machine Learning accounts on Azure Portal.

  • Create a new Resource Group to manage all your services.

  • In the Resource Group:
    • Click Add.
    • Search for Machine Learning in Market Place.
    • From the list select Machine Learning Experimentation (preview)

  • Click Create to begin defining your experimentation account. This will open the ML Experimentation form.
  • Fill the Machine Learning Experimentation form and click Create.

NOTE: This can take a few moments to create. You can check on the status of the deployment process by clicking the Notifications icon (bell) on the Azure portal toolbar.

Install and log in to Azure Machine Learning Workbench

Azure Machine Learning Workbench is available for Windows or macOS.

Download and launch the latest Machine Learning Workbench installer:

  • For Windows click here to download.
  • For MacOs click here to download.

NOTE: Download the installer fully on disk, and then run it from there. Do not run it directly from your browser’s download widget. Also, the installation might take around 30 minutes to complete.

Follow the on-screen instructions in your installer to completion. The installer will download and set up all the necessary dependencies, such as Python, Miniconda, and other related libraries. This installation also includes the Azure cross-platform command-line tool, or Azure CLI.

Once the installation is completed, Launch the workbench.

NOTE: The installation might take around 30 minutes to complete.

Sign in with Microsoft to authenticate with the Azure Machine Learning Workbench. Use the same credentials you used in the Azure portal to create the Experimentation and Model Management accounts.

Once you are signed in, Workbench uses the first Experimentation account it finds in your Azure subscriptions, and displays all workspaces and projects associated with that account. However, you can switch to a different Experimentation account using the icon in the lower-left corner of the Workbench application window.

Create a project in Workbench

In Azure Machine Learning, a project is the logical container for all the work being done to solve a problem. It maps to a single folder on your local disk, and you can add any files or subfolders to it.

Here, we are creating a new Workbench project using a template that includes the Iris flower dataset.

NOTE: Upcoming articles will depend on this data to build a model that predicts the type of iris based on some of its physical characteristics.

Select the plus sign (+) in the PROJECTS pane and choose New Project.

Fill out of the form fields and select the Create button to create a new project in the Workbench.

A new project is created and the project dashboard opens with that project.

Run a Python Script

Now, you can run the iris_sklearn.py script on your local computer. This script is included by default with the Classifying Iris project template. The script builds a logistic regression model using the popular Python scikit-learn library.

  1. In the command bar at the top of the Project Dashboard page, select local as the execution target and select iris_sklearn.py as the script to run.
  2. In the Arguments text box, enter 0.01. This number corresponds to the regularization rate, and is used in the script to configure the logistic regression model.

  3. Select Run to start the execution of the script on your computer. The iris_sklearn.py job immediately appears in the Jobs panel on the right so you can monitor the script’s execution. Congratulations! You’ve successfully run a Python script in Azure Machine Learning Workbench.

  4. Repeat steps 2 – 3 several times using different argument values ranging from 0.001 to 10 (for example, using powers of 10). Each run appears in the Jobs pane.
  5. Inspect the run history by selecting the Runs view and then iris_sklearn.py in the Runs list. This view shows every run that was executed on iris_sklearn.py. The run history dashboard also displays the top metrics, a set of default graphs, and a list of metrics for each run.

  6. You can customize this view by configuring the parts.
  7. Select a completed run in the Jobs pane to see a detailed view for that specific execution. Details include additional metrics, the files that it produced, and other potentially useful logs.

Access Command Line Interface (CLI)

The CLI interface allows you to access and interact with your Azure Machine Learning services using the az commands to perform all tasks required for an end-to-end data science workflow. Learn more.

You can launch the Azure Machine Learning CLI from the Workbench’s toolbar using File > Open Command Prompt.

You can get help on commands in the Azure Machine Learning CLI using the –help argument.

az ml –help

You have now created the necessary Azure Machine Learning accounts and installed the Azure Machine Learning Workbench application. You have also created a project, ran a script, and explored the run history of the script.

Stay in tune for a more in-depth experience of this workflow.

Scroll to Top