Git Product home page Git Product logo

hydraulic-system-predictive-maintenance's Introduction

Hydraulic System Predictive Maintenance

Prerequisites

  • Java >= 7 runtime (JDK >= 1.7)

  • Hydraulic Sensor Test Data Set

    • comes with this repo under model-deployment/common/hydraulic/testData/
  • MOJO2 Runtime JAR

    • comes with this repo under model-deployment/common/hydraulic/mojo-scoring-pipeline/java-runtime/java/mojo2-java-runtime/mojo2-runtime.jar
  • Pipeline MOJO File

    • comes with this repo under model-deployment/common/hydraulic/mojo-scoring-pipeline/mp-hydr-cool-cond-y/pipeline.mojo
  • Recommend Set DRIVERLESS_AI_LICENSE_KEY as an environment variable for OS NiFi, MiNiFi runs on

    • you will need to get Driverless AI product to get the License Key
  • Anaconda or Miniconda: helpful for installing Java packages

  • NiFi or MiNiFi C++

NiFi Interactive & Batch Scoring

There are two NiFi flow that can be built to do interactive (real-time) and batch scoring. It just depends on the data you are ingesting into the flow. If you ingest tabular data that has only 1 row of data in each file, then the ExecuteMojoScoringRecord will do real-time scoring. If you ingest tabular data that has multiple rows of data in each file, then the ExecuteMojoScoringRecord will do batch scoring.

Here are two NiFi templates:

  • /Users/jmedel/Development/James/Hydraulic-System-Predictive-Maintenance/model-deployment/apps/nifi/templates/
    • PredRealTimeHydraulicCoolCond.xml
    • PredBatchHydraulicCoolCond.xml

NiFi Interactive Scoring Flow Example

NiFi DataFlow pulls in csv data with each file containing one row of data, then updates the flow file attribute with a new attribute for schema.name = test-schema. Then real time predictions are made on the flow file for hydraulic cooling condition, the flow file's filename attribute is updated to be a unique csv filename and the flow file is stored into a csv file on the local file system. Flow file attributes can be logged too if the user turns on the log attribute processor.

nifi-mojo-real-time-scoring-p1

Note: You will need to set the Driverless AI License Key as an evironment to use ExecuteMojoScoringRecord processor.

nifi-mojo-real-time-scoring-p2

We can see the real time predictions for hydraulic cooling condition in the files saved to the file system.

NiFi Batch Scoring Flow Example

The NiFi DataFlow will be the same as above, but the GetFile and PutFile will be different. The CSVReader that ExecuteMojoScoringRecord uses will specify that the incoming csv file has headers.

The prediction file in the terminal (or if you look at the NiFi Data Provenance event for List Queue after ExecuteMojoScoringRecord) will hold batch predictions for hydraulic cooling condition:

nifi-mojo-real-time-scoring-p3

Getting Help

If you need assistance with this project, please feel free to reach out and I will get back to you as soon as I can.

Also I will be making an H2O tutorial soon based on H2O Driverless AI Model Deployment to NiFi. I will share that link later.

hydraulic-system-predictive-maintenance's People

Contributors

james94 avatar

Stargazers

Timothy Spann avatar

Watchers

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