From 208e4e51e0bd72f71f2238a7dda2bcd1b9f4a4f9 Mon Sep 17 00:00:00 2001 From: Jad-yehya Date: Thu, 16 May 2024 12:06:55 +0200 Subject: [PATCH] Added option to download SMD dataset. Processing not done yet. --- exploratory/data_preprocess.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/exploratory/data_preprocess.py b/exploratory/data_preprocess.py index c2d20f2..e2169f1 100644 --- a/exploratory/data_preprocess.py +++ b/exploratory/data_preprocess.py @@ -153,6 +153,9 @@ def get_data(dataset_name): args = sys.argv[1:] if args[0] == "download": commands = [ + "git clone https://github.com/NetManAIOps/OmniAnomaly.git", + "mv OmniAnomaly/ServerMachineDataset .", + "rm -rf OmniAnomaly", "wget https://s3-us-west-2.amazonaws.com/telemanom/data.zip", "unzip data.zip", "rm data.zip", @@ -162,7 +165,11 @@ def get_data(dataset_name): for command in commands: subprocess.run(command, shell=True) + # Adds the option to process all datasets at once commands = sys.argv[1:] + if "ALL" in commands: + commands = datasets + load = [] if len(commands) > 0: for d in commands: @@ -173,6 +180,6 @@ def get_data(dataset_name): print( """ Usage: python data_preprocess.py - where should be one of ['SMD', 'SMAP', 'MSL'] + where should be one of ['SMD', 'SMAP', 'MSL', 'ALL'] """ )