From 58911f3b800a66aa7ed20af853b32dcecb1a157e Mon Sep 17 00:00:00 2001 From: Bizid Imen Date: Mon, 7 Mar 2022 10:55:02 +0000 Subject: [PATCH] Update gluonts_forecaster.py --- forecasting_gluonts/gluonts_forecaster.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/forecasting_gluonts/gluonts_forecaster.py b/forecasting_gluonts/gluonts_forecaster.py index 8589be9d..47a99c23 100644 --- a/forecasting_gluonts/gluonts_forecaster.py +++ b/forecasting_gluonts/gluonts_forecaster.py @@ -32,10 +32,12 @@ import itertools from sklearn.model_selection import ParameterGrid import statistics import math +from dataset_maker import CSVData pd.set_option('display.max_row', 500) directory_path = "/morphemic_project/" pd.options.mode.chained_assignment = None +APP_NAME = os.environ.get("APP_NAME") def data_preprocessing(dataset, metric): @@ -68,6 +70,8 @@ def train(metric): data_file_path = os.path.join(os.environ.get("DATA_PATH", "./"), f'{os.environ.get("APP_NAME", "demo")}.csv') dataset = pd.read_csv(data_file_path) while len(dataset) < 50: + dataset_preprocessor = CSVData(APP_NAME) + dataset_preprocessor.prepare_csv() dataset = pd.read_csv(data_file_path) logging.debug(f"Waiting for dataset to be loaded") sleep(30) -- GitLab