This repository provides the implementation of the CAPMix: Robust KPI Anomaly Detection for AIOps in Noisy and Dynamic Environments, called CAPMix bellow.
The implementation uses the Merlion libraries.
This code is based on Python 3.8, all requires are written in requirements.txt. Additionally, we should install saleforce-merlion v1.1.1 and ts_dataset as Merlion suggested.
pip install salesforce-merlion==1.1.1
pip install -r requirements.txt
This repository already includes the merlion's data loading package ts_datasets.
Download the data and unzip it in data/iops_competition, data/asd,data/smd,data/exathlon,data/ucr, data/swat, data/wadi, data/esa, data/ack, respectively.
e.g. For AIOps, download phase2.zip and unzip the data/iops_competition/phase2.zip before running the program.
For ESA dataset, download Mission 1 and unzip it in data/esa, then run processingESAM1.py.
We acknowledge the contributors of the dataset, including AIOps, UCR, SWaT, and WADI.
This repository already includes Merlion's data loading package ts_datasets.
- AIOps Link: https://github.com/NetManAIOps/KPI-Anomaly-Detection .
Download and unzip the data in
data/iops_competition. e.g. For AIOps, downloadphase2.zipand unzip thedata/iops_competition/phase2.zipbefore running the program. - SMD and ASD Link: https://github.com/zhhlee/InterFusion/tree/main/data. The differences between the ASD and SMD datasets can be found at this link: https://github.com/zhhlee/InterFusion/blob/main/data/Dataset%20Description.pdf
- Exathlon Link: https://github.com/exathlonbenchmark/exathlon
- UCR Link: https://wu.renjie.im/research/anomaly-benchmarks-are-flawed/
and https://www.cs.ucr.edu/~eamonn/time_series_data_2018/UCR_TimeSeriesAnomalyDatasets2021.zip .
Download and unzip the data in
data/ucr. - For SWaT and WADI, you need to apply by their official tutorial. Link: https://itrust.sutd.edu.sg/itrust-labs_datasets/dataset_info/ .
Because multiple versions of these two datasets exist,
we used their newer versions:
SWaT.SWaT.A2_Dec2015, version 0andWADI.A2_19Nov2019. Download and unzip the data indata/swatanddata/wadirespectively. Then run theswat_preprocessing()andwadi_preprocessing()functions indataloader/data_preprocessing.pyfor preprocessing.\ - ESA Link: https://zenodo.org/records/12528696 and https://github.com/kplabs-pl/ESA-ADB
AIClusterKPI Link: https://zenodo.org/records/19926114
This directory contains experiment parameters for all models on each dataset.
Source code of CAPMix.
Directory where the experiment result is saved.
# CAPMix
python CAPMix.py --selected_dataset UCR --device cuda --seed 2
python CAPMix.py --selected_dataset IOpsCompetition --device cuda --seed 2