Giter Site home page Giter Site logo

vaibhavirohilla741 / operationalizing-ml Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 20.0 57.02 MB

In this project we use Microsoft Azure to configure a cloud based Machine Learning model.

License: MIT License

Jupyter Notebook 94.29% Shell 2.53% Python 3.18%
azure swagger automl machine-learning

operationalizing-ml's Introduction

Operationalizing a Machine Learning Model In Azure:rocket:

Issues Pull Requests Forks Stars License  

The main objective of this project is to build a machine learning model using Azure Container Services.We have been provided with the banking dataset. The main steps of the project are:-

1) Authentication
2) Automated ML Experiment
3) Deploy the best model
4) Enable logging
5) Swagger Documentation
6) Consume model endpoints
7) Create and publish a pipeline
8) Documentation

Tech-Stacks:

Jupyter Python Shell Script Azure Docker Swagger

Architectural Diagram:clipboard:

An architectual diagram of the project and introduction of each step. alt text

Authentication

It is the vital step to ensure secure and authentic access. Authentication is required for the creation of the Service Principal account and associate it with specific workspace.

Automated ML Experiment

We create the new Automated ML Run Experiment and then upload the Bank Marketing dataset. We run the experiment configuring a new compute cluster, using Classification and ensure that the best model explaination is enabled.

Deploy the Best Model

After the completion of the AutoML Run, we will get our best model. We will then deploy that model using the Azure Container Instance(ACI) and enable Authentication to prevent unauthorized access.

Enable Logging

After the deployment, we will enable the Application Insights from the deployed model. This will help us produce logging output with the python sdk. It plays a vital role to debug problems in production environments.

Swagger Documentation

Swagger helps us build, document and consume RESTful web services. It also explains what type of requests API can consume like POST and GET.

Consume Model Endpoints

We must consume the deployed service to retrieve the data using HTTP request. It will help us in validation of data by identifying if anything is having any problem or is incorrect.

Create and Publish Pipelines

The last and the most vital step is to make the model publically available. This is done by creating a pipeline and then publishing it. It is synonymous to Automation as the pipeline create ways for other services to interact with it using HTTP endpoint.

Key Steps:tickets:

📌Register the Dataset

  • We have to first register the dataset from the local files.
    • Navigate to the Datasets section in the Workspace and create a new dataset from webfile and submit the URL required for the dataset alt text

📌Compute Instance

  • We have to build a compute instance of type DS12_V2 for running the AutoML Run.
    • Maximum number of nodes are 5 and min number of nodes are 5.

📌AutoML Run

  • We have to run an AutoML using the same registered Dataset.
  • We have to mention the same compute instance which we build earlier. alt text

📌Best Model

  • After running the AutoML we need to collect the best model from various diffrent models.
    • Here we got voting ensemble model which chooses voting model to choose the best of several runs. The base model is XGBOOST with Maxabs scaling and accuracy of 91%
    • After the experiment run completes, a summary of all the models and their metrics are shown, including explanations. Below images show the explaination of the best performing model.

alt text gssoc1 gssoc2

📌Endpoint Deployment

  • Once we Have the best model its time to deploy the model. We can use azure Kubernetes service or azure container instane for the deployment.
  • We need to choose authenticate method during the deployment method. Once deployment is succeded an endpoint will be created with status showing as healthy in workspace

📌Application Insights

  • Once the model is deployed we need to enable the logs setting the appinsights = True in the Experiment logging section by adding the experiment name.

  • To enable Application Insights, we run the logs.py file. gssoc3 gssoc4

  • Once we have enabled the logging we should see the status in application insights saying the failed requests, timed out requests etc.

alt text

📌Consume Endpoint (Swagger)

  • We can consume this endpoint using REST API or by running Azure ML python SDK's.

  • Swagger is one of the API tetsing platforms available .

  • Once the model is deployed we get a Swagger JSon file from the endpoint which needs to be downloaded and placed in the folder containing swagger files serve.py and swagger.sh.

  • After that we need to launch a local web server using serve script and lauch swagger using docker container by running swagger.sh

  • Here we are testing both using endpoint.py and Swagger gssoc5 alt text gssoc6

📌Creating and Publishing pipeline

We can schedule the pipelines using schdeule recurrence parameter reducing the manual efforts.

alt text

alt text

alt text

How to Contribute ?:heavy_plus_sign::spiral_notepad:

Check out our CONTRIBUTING GUIDELINES

See project in action HERE🖼️

✳️Standout Suggestions✳️

  • Collecting more data can definitely help in improving accuracy.
  • We can try testing the batch data in a schedule and see the performance.
  • We can try to implement various new algorithms along with running the AutoML Experiment for a longer time period.
  • We can try new values for number of nodes, concurrency etc.
  • We can use GPU's instead of CPU's to improve the performance. Since CPU's might reduce the costs but in terms of performance and accuracy GPU's outperform CPU's.

❤️ Thanks to our awesome contributors:technologist:✨.

LICENSE

This project is licensed under the MIT LICENSE

operationalizing-ml's People

Contributors

agarwalutkarsh554 avatar akrish4 avatar himanshu007-creator avatar imgbotapp avatar kanishka8276 avatar khareyash05 avatar muthuannamalai12 avatar rohan-kulkarni-25 avatar samir-0711 avatar sg7801 avatar sloth-panda avatar subhangini avatar vaibhavirohilla741 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

operationalizing-ml's Issues

ISSUE TEMPLATE

I would like to add issue templates , which will have 3 templates namely bug , feature and proposal templates
It would help the maintainers to understand about what the issue is about
kindly do assign me

Labelling Bot

Is your feature request related to a problem? Please describe.

Add GitHub action to auto label issues with gssoc21 label when contributor asks to work under gssoc21. As it takes time for the maintainer to add labels, I can add a script that can auto-label issues with the GSSOC21 label whenever contributors ask to work under that label.

Describe the solution you'd like

I can add a script that can auto-label issues with the GSSOC21 label whenever contributors ask to work under that label.

Describe alternatives you've considered

None

Additional context

Please assign me this issue with a GSSOC tag and a level tag.

Add Code of Conduct

I would like to add a code of conduct file as code of conduct is a necessary file which the contributors need to follow so that everyone follows a decorum.

Integrate Welcome and Greeting Bot

Hi @vaibhavirohilla741

I would like to contribute to this amazing project
I can add a config file and integrate the bot so that whenever a new user opens a issue or pr , the bot will comment and greet the user with a proper message

Let me know if you are interested

Kindly do assign me
Kindly do add the DWOC and Level label

welcome bot integration

I can add a welcome bot config file having a proper message that will show up when any user will open up an issue or pull-request for the first time.
For reference, check out: https://github.com/apps/welcome

Let me know if this needs to be done

CONTRIBUTING FILE

Is your feature request related to a problem? Please describe.

  • I would like to add a contributing.md file which has all aontributing guidelines and git workflow so that everyone can look into it before contributing

Describe the solution you'd like

  • A markdown file with all contents

Describe alternatives you've considered

  • No alternative needed , I am experienced

Kindly assign me

creation of pr template

Is your feature request related to a problem? Please describe.

  • No pr template is there to explain the features that the pr fulfils

Describe the solution you'd like

  • A pr template will explain a set of checklist that the pr will fulfil so would like to add that

update contributing.md

Hey!
I would like to add the following in the contributing.md -

  1. Difference between GIT and GITHUB
  2. How to clone,fork repository
  3. How to create a branch and then use git push to push to repo
  4. Create a PR
  5. Squash commits in a single issue into one
  6. Updating the forked and local repo as the updations are made in the upstream

Beautifying readme

💥 Proposal

HI, i would like to beautify readme of this repository in following ways:-

  • add a banner
  • add emojis wherever required
  • add other improvements as well

Please add DWOC and level-2 tag to it and assign me this issue. Thanks.

Add CODE_OF_CONDUCT.md

Hello there,
I would like to add CODE_OF_CONDUCT file for this repo as a part of DWOC. Kindly assign me this issue.
THANK YOU

PR Template Not working

The PR template is not showing up when we create a PR. I would love to work on this and correct it. Kindly assign me this issue as a part of Girl Script Summer Of Code.

add CODE_OF_CONDUCT

💥 Proposal

adding Code of conduct to maintain the open source contribution guidelines

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.