• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

NetManAIOps/Squeeze: ISSRE 2019: Generic and Robust Localization of Multi-Dimens ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

NetManAIOps/Squeeze

开源软件地址(OpenSource Url):

https://github.com/NetManAIOps/Squeeze

开源编程语言(OpenSource Language):

Python 99.3%

开源软件介绍(OpenSource Introduction):

Squeeze

Implementation and datasets for ISSRE 2019 REG paper 'Generic and Robust Localization of Multi-Dimensional Root Cause'.

Requirements

At least python>=3.6, <3.7 is required. Though Python should be backward-compatible, there is no built wheel for some requirements like SciPy for a higher Python version.

pip install -r requirements.txt

Datasets

Datasets A, B0, B1, B2, B3, B4, D in Table VII are on Tsinghua Cloud. The ground truth root cause sets are in injection_info.csv in each subfolder.

Usage

$python run_algorithm.py --help
Usage: run_algorithm.py [OPTIONS]

  :param name: :param input_path: :param output_path: :param num_workers:
  :param kwargs: :return:

Options:
  --name TEXT            name of this setting
  --input-path TEXT      will read data from {input_path}/{name}
  --output-path TEXT     if {output_path} is a dir, save to
                         {output_path}/{name}.json; otherwise save to
                         {output_path}
  --num-workers INTEGER  num of processes
  --derived              means we should read {timestamp}.a.csv and
                         {timestamp}.b.csv
  --help                 Show this message and exit.
$python run_evaluation.py --help
Usage: run_evaluation.py [OPTIONS]

Options:
  -i, --injection-info TEXT  injection_info.csv file
  -p, --predict TEXT         output json file
  -c, --config TEXT          config json file
  -o, --output-path TEXT     output path
  --help                     Show this message and exit.

The config json file should contain the attribute names, e.g.:

{
  "columns": [
    "a", "b", "c", "d"
  ]
}

Example

  1. Download B3.tgz and extract B3.tgz into B3.

  2. Run this command:

python run_algorithm.py --name B_cuboid_layer_2_n_ele_2 --input-path B3 --output-path output/ --num-workers 10

​ Then the results are summarized in output/B_cuboid_layer_2_n_ele_2.json:

[
    {
        "timestamp": 1450653900,
        "elapsed_time": 10.794443607330322,
        "root_cause": "b=b31&d=d2;a=a1&b=b11"
    },
    {
        "timestamp": 1450666800,
        "elapsed_time": 15.272005081176758,
        "root_cause": "b=b21&c=c1;a=a4&b=b9&c=c4"
    },
    {
        "timestamp": 1450667700,
        "elapsed_time": 15.22673487663269,
        "root_cause": "b=b11&c=c4;a=a2&d=d1"
    },
    ...
]
  1. Run evaluation scripts
python run_evaluation.py -i B3/B_cuboid_layer_2_n_ele_2/injection_info.csv -p output/B_cuboid_layer_2_n_ele_2.json -c columns.json

columns.json should contain all the attributes.

{
  "columns": [
    "a", "b", "c", "d"
  ]
}

Then we get the output (F1-score, precision, recall):

......
0.7858942065491183 0.7918781725888325 0.78

Known Issues

This version of codes is faithful to the published version. However, two known severe issues are harming the localization performance.

  1. The calculation of _a1 and _a2 in squeeze/squeeze.py:184 is incorrect, which is not following the description in the paper. It should be corrected as follows
     reduced_data_p, _ = self.get_derived_dataframe(
         frozenset(elements[:partition]), cuboid=cuboid,
         reduction="sum", return_complement=True,
         subset_indices=np.concatenate([indices, self.normal_indices]))
     if len(reduced_data_p):
         _a1, _a2 = data_p.predict.values * (
                 reduced_data_p.real.item() / reduced_data_p.predict.item()
         ), data_n.predict.values
     else:
         # print(elements[:partition], data_p, reduced_data_p)
         assert len(data_p) == 0
         _a1 = 0
         _a2 = data_n.predict.values   
  2. The calculation of score_weight in squeeze/suqeeze.py:256 may produce negative values, which will cause incorrect localization results. Different from 1, the calculation here is faithful to the paper. See #6

See also our extended version

Citation

@inproceedings{squeeze,
  title={Generic and Robust Localization of Multi-Dimensional Root Causes},
  author={Li, Zeyan and Luo, Chengyang and Zhao, Yiwei and Sun, Yongqian and Sui, Kaixin and Wang, Xiping and Liu, Dapeng and Jin, Xing and Wang, Qi and Pei, Dan},
  booktitle={2019 IEEE 30th International Symposium on Software Reliability Engineering (ISSRE)},
  year={2019},
  organization={IEEE}
}



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap