AnomaLLM is a Python SDK for explainable anomaly detection on multivariate time-series data. It includes an LSTM autoencoder for reconstruction-based anomaly scoring, Granger-style causality analysis, and an LLM-backed incident reporter.
- LSTM autoencoder for anomaly scoring
- Causality tracing for root-cause analysis
- LLM-generated incident summaries
- Streamlit dashboard for visual inspection
- Repo-local sample C-MAPSS data for reproducible runs
- Python 3.8+
torchpandasnumpyscikit-learnstatsmodelsnetworkxopenai- Optional for the dashboard:
streamlit,plotly
If you want the LLM-generated report, set OPENAI_API_KEY in your environment.
export OPENAI_API_KEY="your-api-key-here"git clone https://github.com/ayush585/AnomaLLM.git
cd AnomaLLM
python -m venv venv
# Windows:
# venv\Scripts\activate
pip install -e .Train the model:
python train.pyRun the CLI demo:
python demo.pyRun the Kaggle-style demo:
python demo_kaggle.pyLaunch the dashboard:
streamlit run dashboard.pyanomallm/ SDK package
dashboard.py Streamlit dashboard
demo.py CLI demo with webhook forwarding
demo_kaggle.py Dataset-blind demonstration
train.py Training entry point
setup.py Packaging metadata
lstm_v1.pth Optional generated model checkpoint
train_FD001.txt Repo-local sample training data
test_FD001.txt Repo-local sample test data
RUL_FD001.txt Repo-local reference data
data/ Optional user data directory
- The bundled scripts resolve sample datasets relative to the repository root.
- The
data/directory is optional and no longer holds machine-specific pointer files. lstm_v1.pthis generated bytrain.pyand is not required to exist before runningdemo.py.