diff --git a/forecasting_gluonts/gluonts_forecaster.py b/forecasting_gluonts/gluonts_forecaster.py index 8589be9d1a0903739bf4bf6f5e84f673f4d4b867..47a99c238c9aeeff12c30f74ff75e4ee740aec99 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)