Coder Social home page Coder Social logo

azuremltensorflow's Introduction

Azure Machine Learning service Hands-On all for TensorFlow

This following Tutorial will take you through the deployment of Azure Machine Learning (AML) service using TensorFlow along with the entire Machine Learning development lifecycle of explore data, train, tune, and publish.

Azure access for Students & Educators

All student get $100 of Azure credit via Azure for Student for more details and get registered see Azure Dev Tools for teaching

Data Resources

You can get MNIST dataset (train.tfrecords, test.tfrecords) in this example by running the following code, https://raw.githubusercontent.com/tensorflow/tensorflow/master/tensorflow/examples/how_tos/reading_data/convert_to_records.py

Microsoft Research Open Data Beta - Is a collection of free datasets from Microsoft Research to advance state-of-the-art research in areas such as natural language processing, computer vision, and domain specific sciences. Download or copy directly to a cloud-based Data Science Virtual Machine for a seamless development experience. see https://msropendata.com/

You can simply add any new data sets into your data folder.

Exercises

Before starting, you must provision your environment as follows :

1. Setup your Virtual Machine and Conda Env

  • Create Data Science Virtual Machine DSVM on Ubuntu (which also includes Azure ML CLI) using Azure Portal

    Here we use DSVM, but you can also build your own environment from scratch.

    You will have to run some commands after the initial install to update your DSVM application and libararies

# Fetches the list of available updates
sudo apt-get update
# Strictly upgrades the current packages
sudo apt-get upgrade
# Installs updates (new ones)
sudo apt-get dist-upgrade

or you can do it all nicely with this single script

sudo bash -c 'for i in update {,dist-}upgrade auto{remove,clean}; do apt-get $i -y; done'
  • Create conda virtual environment and activate as follows.
conda create -n myenv -y Python=3.6
# Update Conda Environment 
conda update -n base -c defaults conda 
conda activate myenv
  • Install required packages in your conda environment (You must run in your conda env.) so please ensure you have used the command conda activate myenv

Install Azure Machine Learning SDK

In the next step we will install azureml-sdk[notebooks] installs notebook in your conda env and azureml_widgets extension (which is used in Exercise06) this Notebook extension is enabled in Jupyter. (See installed extension using jupyter nbextension list.)

# install AML SDK
pip install azureml-sdk[notebooks]

# install notebook integration for conda
conda install nb_conda

# install required packages for development
# (use "tensorflow-gpu" if using GPU VM)
conda install -y matplotlib tensorflow

2. Create AML Workspace

Create new "Machine Learning services workspace" using Azure Portal see Creating Azure ML Workspace Please make sure that you must specify location (region) which supports NC-series (K80 GPU) virtual machines in workspace creation, because workspace location is used when you create AML compute resources (virtual machines) in AML Python SDK. (See here for supported regions.)

3. Make Sure to Install Azure Container Instance (ACI) Provider in Your Azure Subscription

Azure Container Instances offers the fastest and simplest way to run a container in Azure, without having to provision any virtual machines and without having to adopt a higher-level service. Learn how to create and manage container instances with our quickstarts, tutorials, and samples

  • Remove azure-ml-admin-cli extension on VM as follows. (This extension is already installed on DSVM and prevents you from running az login command.)
sudo -i az extension remove --name azure-ml-admin-cli
  • Login to Azure using CLI
az login
  • Check to see if ACI provider is already registered
az provider show -n Microsoft.ContainerInstance -o table
  • If ACI is not registered, run the following command. (You should be the subscription owner to run this command.)
az provider register -n Microsoft.ContainerInstance

4. Start Jupyter Notebook

  • Start jupyter notebook server in your conda environment.
jupyter notebook
  • Copy url for notebook in the console output, and set SSH tunnel (port forwarding) on your desktop to access notebook. For instance, the following picture is the SSH tunnel setting on "putty" terminal client in Windows. (You can use ssh -L option in Mac OS.) SSH Tunnel settings with putty

  • Open your notebook url (http://localhost:8888/?token=...) using web browser in your desktop. Notebook Login

Simply paste into the password or token box the token recieved and press login this will load the Jupyter Hub

  • Create new notebook by selecting "Python 3.6" kernel (which is your current conda environment).

Now you're ready to start !

References

azuremltensorflow's People

Contributors

leestott avatar tsmatsuz avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.