Code Monkey home page Code Monkey logo

beyond-the-basics-with-azureml's Introduction

Getting Beyond the Basics with Azure Machine Learning

This repository provides the supporting code for my presentation entitled Beyond the Basics with Azure ML.

Generating Data

This data comes from the Chicago Parking Ticket database, courtesy of Daniel Hutmacher. I sampled 1,000,000 records from it and the file I used is available in CSV format.

Import this into Azure ML using the Dataset name ChicagoParkingTicketsFolder. Be sure to upload this as a uri_folder instead of an MLtable or uri_file!

Running the Code

Basic Notebook

Import the notebook in the Notebook folder into Azure Machine Learning. You will need to create a compute instance to run this.

ML Pipeline

In order to run the ML pipeline notebooks and jobs locally, you will need to have the following installed on your machine:

Before you run the code, make sure your console has you logged into Azure via CLI:

az login

Then, create a folder called .azureml and a file named config.json. The file should look like the following structure:

{
    "subscription_id": "YOUR SUBSCRIPTION ID",
    "resource_group": "YOUR RESOURCE GROUP",
    "workspace_name": "YOUR WORKSPACE NAME"
}

Note that you must be logged into az cli with an account which has access to the subscription, resource group, and workspace.

From there, run the training code:

python deploy-train.py

You can see the job in action by going to Azure ML Studio and viewing the "Chicago_Parking_Tickets_Code-First" experiment. There will be a new "train_pipeline" job.

For scoring, run the following code:

python deploy-score.py

This will create a batch endpoint and deployment, upload data to a Datastore in Azure ML, create a job to generate predictions, and downloads the resulting predictions to a local file called predictions.csv.

IMPORTANT NOTE -- You must explicitly grant rights to the account running deploy-score.py against the Azure ML workspace. I granted Owner because I was running this personally, but it must be explicitly granted and not just have ownership as a side effect of subscription-level or resource group-level rights.

If you do not do this, you will likely get a strange BY_POLICY error message when running this script.

beyond-the-basics-with-azureml's People

Contributors

feaselkl 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.