Giter Site home page Giter Site logo

ai-jie01 / predictive-maintenance-using-machine-learning Goto Github PK

View Code? Open in Web Editor NEW

This project forked from awslabs/predictive-maintenance-using-machine-learning

0.0 0.0 0.0 26.31 MB

Set up end-to-end demo architecture for predictive maintenance issues with Machine Learning using Amazon SageMaker

License: Apache License 2.0

Shell 0.02% C++ 0.01% Python 98.29% C 1.57% Fortran 0.04% Smarty 0.01% Jupyter Notebook 0.06%

predictive-maintenance-using-machine-learning's Introduction

Predictive Maintenance using Machine Learning

Companies need to monitor their industrial assets to ensure sustained performance and the typical manual routine checkups are time-consuming and reactive. However, with the advent of cheap sensors, companies can get metrics from industrial assets at regular intervals and with this trove of data, companies can use machine learning models to predict when assets might fail.

This project shows how to use Amazon SageMaker to train a deep learning model that uses historical sensor readings to predict how much longer the asset is likely to work for before it becomes critical. As a demonstration, the project trains an MXNet model on the NASA turbofan engine dataset, but can be easily customized to work with other sensor based data.

Getting Started

You will need an AWS account to use this solution. Sign up for an account here.

To run this JumpStart 1P Solution and have the infrastructure deploy to your AWS account you will need to create an active SageMaker Studio instance (see Onboard to Amazon SageMaker Studio). When your Studio instance is Ready, use the instructions in SageMaker JumpStart to 1-Click Launch the solution.

The solution artifacts are included in this GitHub repository for reference.

Note: Solutions are available in most regions including us-west-2, and us-east-1.

Caution: Cloning this GitHub repository and running the code manually could lead to unexpected issues! Use the AWS CloudFormation template. You'll get an Amazon SageMaker Notebook instance that's been correctly setup and configured to access the other resources in the solution.

Architecture

The project architecture deployed by the cloud formation template is shown here.

Project Description

The project uses Amazon SageMaker to train a deep learning model with the MXNet deep learning framework. The model used is a stacked Bidirectional LSTM neural network that can learn from sequential or time series data. The model is robust to the input dataset and does not expect the sensor readings to be smoothed, as the model has 1D convolutional layers with trainable parameter that can to smooth and peform feature transformation of the time series. The deep learning model is trained so that it learns to predict the remaining useful life (RUL) for each sensor.

The model training is orchestrated by running a jupyter notebook on a SageMaker Notebook instance. When you go through the project demonstration, the nasa turbofan engine dataset is automatically downloaded to an S3 bucket created in your account, by the quick launch template above.

In to demonstrate how the project can be used to perform batch inference on new time series data from sensor readings, an AWS Lambda function (https://github.com/awslabs/predictive-maintenance-using-machine-learning/blob/master/source/predictive_maintenance/index.py) is included. The Lambda function can be invoked by an AWS CloudWatch Event so that it runs on a schedule or AWS S3 put event so that it runs as soon as new sensor readings are stored in S3. When invoked, the Lambda function creates a SageMaker Batch Transform job, which uses the SageMaker Model that was saved during training, to obtain model predictions for the new sensor data. The results of the batch transform job are stored back in S3, and can be fed into a dashboard or visualization module for monitoring.

Contents

  • deployment/
    • predictive-maintenance-using-machine-learning.yaml: Creates AWS CloudFormation Stack for solution
  • source/
    • predictive-maintenance/
      • index.py: Lambda function script for creating SageMaker Batch Transforms jobs for batch inference
    • notebooks/
      • sagemaker_predictive_maintenance
        • sagemaker_predictive_maintenance_entry_point
          • requirements.txt: specifies requirements that need to be present in the SageMaker training container
          • sagemaker_predictive_maintenance_entry_point.py: Entry point script containing MXNet implementation for training the model
        • config.py: python config file to read cloudformation stack outputs and parametrize the solution
        • preproces.py: data preprocessing script
        • setup.py: setup the directory as a local python package
        • utils.py: utility function around preparing batch transform input and output
      • sagemaker_predictive_maintenance.ipynb: Orchestrates the solution. Trains the models and saves the trained model

License

This project is licensed under the Apache-2.0 License.

predictive-maintenance-using-machine-learning's People

Contributors

ehsanmok avatar jamesiri avatar sojiadeshina avatar vishaalkapoor 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.