Skip to content

Commit

Permalink
fix load detector
Browse files Browse the repository at this point in the history
  • Loading branch information
hahahannes committed Jun 18, 2024
1 parent c31613a commit 395bfa1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion algo/curve_anomaly/load_det/load_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion algo/curve_anomaly/load_det/load_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down

0 comments on commit 395bfa1

Please sign in to comment.