Giter Club home page Giter Club logo

nasa / prog_server Goto Github PK

View Code? Open in Web Editor NEW
8.0 7.0 5.0 1.31 MB

The NASA Prognostics As-A-Service (PaaS) Sandbox is a simplified implementation of a Software Oriented Architecture (SOA) for performing prognostics (estimation of time until events and future system states) of engineering systems. The PaaS Sandbox is a wrapper around the Prognostics Algorithms Package and Prognostics Models Package, allowing one or more users to access the features of these packages through a REST API. The package is intended to be used as a research tool to prototype and benchmark Prognostics As-A-Service (PaaS) architectures and work on the challenges facing such architectures, including Generality, Communication, Security, Environmental Complexity, Utility, and Trust.

License: Other

Python 100.00%
prognostics prognostics-health-management prognostics-as-a-service

prog_server's Introduction

Prognostics As-A-Service (PaaS) Sandbox

CodeFactor GitHub License GitHub Releases

The NASA Prognostics As-A-Service (PaaS) Sandbox is a simplified implementation of a Software Oriented Architecture (SOA) for performing prognostics (estimation of time until events and future system states) of engineering systems. The PaaS Sandbox is a wrapper around the Prognostics Python Package (ProgPy), allowing one or more users to access the features of these packages through a REST API. The package is intended to be used as a research tool to prototype and benchmark Prognostics As-A-Service (PaaS) architectures and work on the challenges facing such architectures, including Generality, Communication, Security, Environmental Complexity, Utility, and Trust.

This is designed to be used with the Prognostics Python Package (ProgPy).

Installation

pip install prog_server

See documentation here

Citing this repository

Use the following to cite this repository:

@misc{2023_nasa_prog_server,
    author    = {Christopher Teubert and Jason Watkins and Katelyn Jarvis},
    title     = {Prognostics As-A-Service (PaaS) Sandbox},
    month     = October,
    year      = 2023,
    version   = {1.6},
    url       = {https://github.com/nasa/prog_server}
    }

The corresponding reference should look like this:

C. Teubert, J. Watkins, K. Jarvis, Prognostics As-A-Service (PaaS) Sandbox, v1.6, Oct 2023. URL https://github.com/nasa/prog_server.

Notices

Copyright © 2021 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All Rights Reserved.

Disclaimers

No Warranty: THE SUBJECT SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY OF ANY KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR FREEDOM FROM INFRINGEMENT, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL BE ERROR FREE, OR ANY WARRANTY THAT DOCUMENTATION, IF PROVIDED, WILL CONFORM TO THE SUBJECT SOFTWARE. THIS AGREEMENT DOES NOT, IN ANY MANNER, CONSTITUTE AN ENDORSEMENT BY GOVERNMENT AGENCY OR ANY PRIOR RECIPIENT OF ANY RESULTS, RESULTING DESIGNS, HARDWARE, SOFTWARE PRODUCTS OR ANY OTHER APPLICATIONS RESULTING FROM USE OF THE SUBJECT SOFTWARE. FURTHER, GOVERNMENT AGENCY DISCLAIMS ALL WARRANTIES AND LIABILITIES REGARDING THIRD-PARTY SOFTWARE, IF PRESENT IN THE ORIGINAL SOFTWARE, AND DISTRIBUTES IT "AS IS."

Waiver and Indemnity: RECIPIENT AGREES TO WAIVE ANY AND ALL CLAIMS AGAINST THE UNITED STATES GOVERNMENT, ITS CONTRACTORS AND SUBCONTRACTORS, AS WELL AS ANY PRIOR RECIPIENT. IF RECIPIENT'S USE OF THE SUBJECT SOFTWARE RESULTS IN ANY LIABILITIES, DEMANDS, DAMAGES, EXPENSES OR LOSSES ARISING FROM SUCH USE, INCLUDING ANY DAMAGES FROM PRODUCTS BASED ON, OR RESULTING FROM, RECIPIENT'S USE OF THE SUBJECT SOFTWARE, RECIPIENT SHALL INDEMNIFY AND HOLD HARMLESS THE UNITED STATES GOVERNMENT, ITS CONTRACTORS AND SUBCONTRACTORS, AS WELL AS ANY PRIOR RECIPIENT, TO THE EXTENT PERMITTED BY LAW. RECIPIENT'S SOLE REMEDY FOR ANY SUCH MATTER SHALL BE THE IMMEDIATE, UNILATERAL TERMINATION OF THIS AGREEMENT.

prog_server's People

Contributors

lawrence-hwang avatar milescrabbe avatar teubert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

prog_server's Issues

Make a 'pyproject.toml' to match progpy

Requirement Text
Switch from using setup.py to using a 'pyproject.toml' file instead.

Background Information
Progpy recently switched, so it makes sense for prog_server to switch too.

DoD
Switched to the new file format, and updated the documentation on how to install a local dev build because "pip install -e ." won't work anymore. "python3 -m pip install ." seemed to work for me but may not be an editable install.

Support incomplete input

Requirement Text
prog_server shall allow an incomplete data frame is sent to the service

Background Information
models take more than one input and output. sometimes they're received at different rates. The service should be able to handle this and only start a state estimate when we've received a full data frame

Suggested Solution
Keep track of received data. When all required inputs and outputs have been received, trigger state estimation

DoD

  • Implement feature
  • Add to example
  • Add tests
  • Add to change notes for next release

Ability to Save Current State to File

Suggestion of @jason-watkins from v1.0 release review.

It would be nice to have a feature that allows users to save the current state of the system (all sessions) to a file to be restored. The point is to be able to share a single state between researchers or to restore to a known point before trying different actions.

D.o.D.

  • Ability to save all sessions implemented
  • Ability to restore from save implemented
  • Tests exist
  • Added to documentation
  • Added to release notes for v1.1

x0 UncertainData in Session Construction

Requirement Text
Initial state as UncertainData in session creation.

Background Information
Currently x0 in session creation can be a dict, but not UncertainData. But you can set it as uncertain data using the set_state method.

Suggested Solution
Propogate changes to session construction

DoD

  • Implement feature
  • Add to example
  • Add tests
  • Add to change notes for next release

Custom models

Requirement Text
Add support for custom models to be added to a Prog server instance without being added to ProgPy package

Background Information
Currently prog server only searches for packages in ProgPy itself

Suggested Solution
Allow specifying a directory when starting prog server. This directory will be added to the search directory for models.

DoD

  • Implement feature
  • Add tests
  • Add to change notes for next release

Exception in prediction when hitting horizon

Describe the bug
Using prog_server, I got an exception when making a prediction and the prediction was stopped by hitting the horizon. Flask returned the html output of the exception back to the client, rather than an HTTP error code.

Relevant Requirements
Nothing directly relevant, but I found it when I was investigating the propagate to event functionality.

To Reproduce
Steps to reproduce the behavior:

  • Download this file and remove the .txt extension to make it a shell script again
    prog_server_sws_model.sh.txt
  • Install the dependencies needed by the bash script, listed at the top
  • Start prog_server using the SWS script that adds the SWS models to the server, wait for it to initialize
  • In another window run the prog_server_sws_model.sh shell script. Note it calls for a prediction and gives a short horizon=5.0
  • prog_server is expected to throw an exception
    • If debugging, there is an IndexError that you can press "resume" and it is handled (out of debugger it doesn't stop application)
    • The problem one is "ValueError('All samples were none')", which is being raised from uncertain_data_metrics.py line 82.
  • This ValueError exception is sent back to the web client, which may or may not be what you want the interface to be. Maybe that is useful, maybe you would want to send an HTTP error of some sort.

Expected behavior
When the horizon is hit, I would expect the return to be the set of events being monitored and their values.

Screenshots
I don't think you'd need screenshots, but let me know if they would help.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Python Version 3.8.10

Additional context
none

ProgPy

Describe the bug
Current version of prog_server and client use prog_models and algs, instead of the new progpy

Endpoint to get/set current configuration

Requirement Text
Be able to get or set the current configuration for an active session

Background Information
Currently, configuration is set when the session is created. It is desirable to be able to get and update a configuration for an active session

Suggested Solution
Add endpoints for configuration. I'm thinking either:

  1. /session/int:session_id/config, or
  2. /session/int:session_id/[THE THING]/config (e.g., predictor/config or state_estimator/config)

Where PUT would replace the config and POST would update.

When getting config, the end point would have to collect the configuration from each of the elements (model, state_estimator, predictor) into a large dictionary which is returned

When updating, the end point would have to set the specified system (for model, the model in the state estimator and predictor; for predictor, the predictor, etc.)

DoD

  • Implement endpoints in server
  • Update swagger file accordingly
  • Update client to add this functionality
  • Add to example
  • Add tests
  • Add to change notes for next release

Support no predictor

Support state estimation only by setting predictor to none.

D.o.D.

  • Support ability to set predictor to none.
  • Add tests
  • Add to release notes

Custom State Estimators

Requirement Text
Users should be able to provide custom state estimators, like they can with predictors and models

Suggested Solution
Follow pattern of predictors

DoD

  • Implement feature
  • Add tests
  • Add to change notes for next release

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.