Giter Club home page Giter Club logo

monitor-azure-ml-with-watson-openscale's Introduction

Monitor Azure ML With Watson OpenScale

In this Code Pattern, we will use fictional sales data to create a logistic regression model using Azure Machine Learning Studio. We will use Watson OpenScale to bind the ML model deployed in the Azure cloud, create a subscription, and perform payload and feedback logging.

When the reader has completed this Code Pattern, they will understand how to:

  • Prepare data, train a model, and deploy using Azure Machine Learning Studio
  • Score the model using sample scoring records and the scoring endpoint
  • Setup Watson OpenScale Data Mart
  • Bind the Azure model to the Watson OpenScale Data Mart
  • Add subscriptions to the Data Mart
  • Enable payload logging and performance monitoring for both subscribed assets
  • Use Data Mart to access tables data via subscription

architecture

Flow

  1. The developer creates a Jupyter Notebook.
  2. The Jupyter Notebook is connected to a PostgreSQL database, which is used to store Watson OpenScale data.
  3. An ML model is created using Azure ML Studio, using data from GoSales_Tx, and then it is deployed to the cloud.
  4. Watson Open Scale is used by the notebook to log payload and monitor performance.

Prerequisites

Steps

  1. Clone the repository
  2. Create a Databases for PostgreSQL DB
  3. Create a Watson OpenScale service
  4. Run the notebook

1. Clone the repository

git clone https://github.com/IBM/monitor-sagemaker-ml-with-ai-openscale
cd monitor-sagemaker-ml-with-ai-openscale

2. Create a Databases for PostgreSQL DB

  • Using the IBM Cloud Dashboard catalog, search for PostgreSQL and choose the Databases for Postgres service:

  • Wait a couple of minutes for the database to be provisioned.

  • Click on the Service Credentials tab on the left and then click New credential + to create the service credentials. Copy them or leave the tab open to use later in the notebook.

3. Create a Watson OpenScale service

4. Run the notebook

How to get api key using ibmcloud console:

ibmcloud login --sso
ibmcloud iam api-key-create 'my_key'

How to get your Watson OpenScale instance GUID:

ibmcloud resource service-instance <WatsonOpenScale_instance_name>
  • Enter the instance_guid and apikey in the next cell for the WATSON_OS_CREDENTIALS.
  • In the cell after that enter POSTGRES_CREDENTIALS using the value for the PostreSQL credentials from Step #2.
  • In the cell after 2.1 Bind Azure machine learning engine enter the client_id, client_secret, subscription_id, and tenant for the AZURE_ENGINE_CREDENTIALS.

NOTE: Setting up Azure Active Directory for the AZURE_ENGINE_CREDENTIALS is beyond the scope of this document. See Azure documentation for help with this.

  • After running 3.1 Add subscriptions you will get a source_uid to enter in the cell that follows.
  • Move your cursor to each code cell and run the code in it. Read the comments for each cell to understand what the code is doing. Important when the code in a cell is still running, the label to the left changes to In [*]:. Do not continue to the next cell until the code is finished running.

Sample Output

See the example notebook with output

License

This code pattern is licensed under the Apache License, Version 2. Separate third-party code objects invoked within this code pattern are licensed by their respective providers pursuant to their own separate licenses. Contributions are subject to the Developer Certificate of Origin, Version 1.1 and the Apache License, Version 2.

Apache License FAQ

monitor-azure-ml-with-watson-openscale's People

Contributors

scottdangelo avatar rhagarty avatar stevemart avatar imgbotapp avatar

Watchers

James Cloos avatar Claudio Pinheiro 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.