From 0985e9cee06620b858c1eaca83ef35346d7b5220 Mon Sep 17 00:00:00 2001 From: Anna Warno Date: Thu, 9 Sep 2021 18:23:49 +0200 Subject: [PATCH] predictions corrected --- deployment/nbeats/main.py | 4 ++-- deployment/nbeats/predict.py | 7 ++----- deployment/tft/predict.py | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/deployment/nbeats/main.py b/deployment/nbeats/main.py index 9b9bea1f..4427fce4 100644 --- a/deployment/nbeats/main.py +++ b/deployment/nbeats/main.py @@ -114,11 +114,11 @@ def main(): ) # msg1 = Msg() - # msg1.body = '[{"metric": "memory", "level": 3, "publish_rate": 10000}]' + # msg1.body = '[{"metric": "memory", "level": 3, "publish_rate": 30000}]' # msg2 = Msg() # msg2.body = ( # "{" - # + f'"metrics": ["memory"],"timestamp": {int(time.time())}, "epoch_start": {int(time.time()) + 30}, "number_of_forward_predictions": 8,"prediction_horizon": 20' + # + f'"metrics": ["memory"],"timestamp": {int(time.time())}, "epoch_start": {int(time.time()) + 30}, "number_of_forward_predictions": 8,"prediction_horizon": 30' # + "}" # ) diff --git a/deployment/nbeats/predict.py b/deployment/nbeats/predict.py index 5fa7410f..2dd0091d 100644 --- a/deployment/nbeats/predict.py +++ b/deployment/nbeats/predict.py @@ -126,7 +126,7 @@ def main(): prediction_msgs, prediction = predict( metric, prediction_length, - extra_data=predictions, + extra_data=None, m=i + 1, prediction_hor=prediction_horizon, timestamp=time_0 + (i + 1) * (prediction_horizon // 1000), @@ -136,10 +136,7 @@ def main(): print( f"time_0 difference seconds {start_time + (i + 1) * prediction_horizon // 1000 - int(time.time())}" ) - # if predictions is not None: - # predictions = pd.concat( - # [predictions, prediction], ignore_index=True - # ) + else: predictions = prediction diff --git a/deployment/tft/predict.py b/deployment/tft/predict.py index c56c10c8..dc057f42 100644 --- a/deployment/tft/predict.py +++ b/deployment/tft/predict.py @@ -126,7 +126,7 @@ def main(): prediction_msgs, prediction = predict( metric, prediction_length, - extra_data=predictions, + extra_data=None, m=i + 1, prediction_hor=prediction_horizon, timestamp=time_0 + (i + 1) * (prediction_horizon // 1000), -- GitLab