Skip to content

marov/predictive_maintenance_model

Repository files navigation

Setup

Python Environment

Environment is using conda. To install conda, follow the instructions here. You can then create a new environment using the following command:

conda env create --prefix ./.conda --file environment.yaml

where <env> is the name of the environment you want to create. You can then activate the environment using:

conda activate ./.conda

To export the environment (to add new packages), use:

conda env export --file environment.yaml

Notebooks

The notebooks are located in the notebooks directory:

Training code

Main executables are train.py and predict.py. In future, they would include CLI and API. Right now, they are just executable scripts. The model logic is defined in predictive_maintenance/feature_transformers.py and predictive_maintenance/modeler.py. They make use of the generic implementation of XGBoost model (as part of H1st framework) is in ml_model/ml_xgboost.py.

Application

predict.py is but a demo/test script. The real application is in streamlit_app.py. It is a Streamlit app that uses the same model as predict.py to predict machine failures and visualize the results. To run the app locally, use:

streamlit run streamlit_app.py

Streamlit cloud will automatically updat the app at https://marov-predictive-maintenance-model-streamlit-app-0mbk0u.streamlit.app when you push to the repo.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages