From 395bfa189210b555858fa686d7d539a3d57c34ca Mon Sep 17 00:00:00 2001 From: Hannes Hansen Date: Tue, 18 Jun 2024 17:51:10 +0200 Subject: [PATCH] fix load detector --- algo/curve_anomaly/load_det/load_detector.py | 2 +- algo/curve_anomaly/load_det/load_utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/algo/curve_anomaly/load_det/load_detector.py b/algo/curve_anomaly/load_det/load_detector.py index 4de06db..ed5fb09 100644 --- a/algo/curve_anomaly/load_det/load_detector.py +++ b/algo/curve_anomaly/load_det/load_detector.py @@ -7,7 +7,7 @@ def __init__(self, data_path, init_median, first_data_time): self.filename_dict.update({"loads": f'{data_path}/loads.pickle', "endpoint_last_load": f'{data_path}/endpoint_last_load.pickle'}) - self.loads, self.endpoint_last_load = load_utils.load_data(self.filename_dict, self.loads, self.endpoint_last_load) + self.loads, self.endpoint_last_load = load_utils.load_data(self.filename_dict) def check(self, value, timestamp): if self.first_data_time == None: diff --git a/algo/curve_anomaly/load_det/load_utils.py b/algo/curve_anomaly/load_det/load_utils.py index 39d57dd..d813d7c 100644 --- a/algo/curve_anomaly/load_det/load_utils.py +++ b/algo/curve_anomaly/load_det/load_utils.py @@ -11,7 +11,7 @@ def save_data(filename_dict, loads, endpoint_last_load): with open(endpoint_last_load_path, 'wb') as f: pickle.dump(endpoint_last_load, f) -def load_data(filename_dict, loads, endpoint_last_load): +def load_data(filename_dict): loads_path = filename_dict["loads"] endpoint_last_load_path = filename_dict["endpoint_last_load"]