Skip to content

dntrply/udacity-pipeline

Repository files navigation

Operationalizing Machine Learning

This project comprises of operationalizing Machine Leanning in Microsoft Azure. A classification model is trained and deployed. The deployed model endpoint URI can later be used to make predictions A pipline is also created, published and consumed. The published pipeline endpoint URI can later be used to initiate a new run.

Architectural Diagram

image

Suggestions for improvement

  1. Consider implementing one or more stand out suggestions
  2. Research and use balanced data to improve the outcome of the predictions
  3. Version the pipelines. This would allow development of new models while customers continue to use the existing version

Key Steps

Step 2: Automated ML Experiment

This step allows a model to be trained across different algorithms/parameters and highlights the best model

  1. An Azure ML Dataset is created and registered if it does not already exist from the URL for Marketing Bank data. image

  2. A Compute cluster is created if it does not already exist

  3. An AtoML confiuration is specified with key information such as the best netric to use, the column label, etc.

  4. A run is then submitted to train the model. Once the experiment/run is completed, the best model is identified. image image image

Step 3: Deploy the best model

In this step, we use the Azure ML Studio U/I t odeploy the best model. We use ACI (Azure Container Instance) with authentication enabled.

Step 4. Enable logging

Logging helps troublshoot and understanding the workflow. It also helps with quantifying performance at various stages of the execution. The WebServcie is used to enable/disable Application Insights. image

Sample output of the logs that are available once application insight is enabled. image

Step 5. Swagger Doc

Once a model is published, AzureML exposes a swagger.json file. This can be consumed by Swagger and helps with the documentation of the methods that are exposed together with the JSON payloads for input/output. This makes it much easier to start consuming the endpoint. image image image image

Step 6. Consume model endpoints

The model endpoint is consumed by making a REST API call to the scoring URI. If authentication is enabled, the key must also be provide. The output of such a model invocation is displayed below. image

Step 7. Create and publish pipeline

A pipeline is created when it is "run in the context of an experiment. THe pipeline can also be visualized in the Pipelines section of AzureML Studio image

Once a pipeline is published, a pipeline endpoint is generated and may be accessed from Azure ML Studio under the 'Pipeline Endpoint' tab image

Review of the pipeline from Azure ML studio showing the bank marketing dataset and the AutoML module image

Once published, the Pipeline Details tab will show the published pipeline status (Active in this case) and also the pieline REST endpoint that can be called to "run" the pipeline. image

THe RunDetails widget asychronously displays the run detais in the Notebook as the pipeline run progresses. image

A pipeline run stats (Scheduled, Completed, etc.) can be reviewed in AzureML Studio in the Pipelines section image

Screen Recording

https://drive.google.com/file/d/1ATN5RPttjm1xlc9htaBOFCGPFaAHfoE8/view?usp=sharing

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages