Skip to content
Snippets Groups Projects
Commit 786c530e authored by lukas leufen's avatar lukas leufen
Browse files

a mismatch in the naming caused the failing tests, code is corrected now

parent 09c7a418
No related branches found
No related tags found
3 merge requests!125Release v0.10.0,!124Update Master to new version v0.10.0,!112WIP: Resolve "decouple JOIN and MLT"
Pipeline #40538 passed
......@@ -297,7 +297,7 @@ class ExperimentSetup(RunEnvironment):
self._set_param("sampling", sampling)
self._set_param("transformation", transformation, default=DEFAULT_TRANSFORMATION)
self._set_param("transformation", None, scope="preprocessing")
self._set_param("DataPrep", data_preparation, default=DataPrepJoin)
self._set_param("data_preparation", data_preparation, default=DataPrepJoin)
# target
self._set_param("target_var", target_var, default=DEFAULT_TARGET_VAR)
......
......@@ -19,7 +19,7 @@ from src.run_modules.run_environment import RunEnvironment
DEFAULT_ARGS_LIST = ["data_path", "stations", "variables", "interpolate_dim", "target_dim", "target_var"]
DEFAULT_KWARGS_LIST = ["limit_nan_fill", "window_history_size", "window_lead_time", "statistics_per_var", "min_length",
"station_type", "overwrite_local_data", "start", "end", "sampling", "transformation",
"extreme_values", "extremes_on_right_tail_only", "network", "DataPrep"]
"extreme_values", "extremes_on_right_tail_only", "network", "data_preparation"]
class PreProcessing(RunEnvironment):
......
......@@ -2,6 +2,7 @@ import os
import pytest
from src.data_handling import DataPrepJoin
from src.data_handling.data_generator import DataGenerator
from src.helpers.datastore import EmptyScope
from src.model_modules.keras_extensions import CallbackHandler
......@@ -29,8 +30,9 @@ class TestModelSetup:
@pytest.fixture
def gen(self):
return DataGenerator(os.path.join(os.path.dirname(__file__), 'data'), 'AIRBASE', 'DEBW107', ['o3', 'temp'],
'datetime', 'variables', 'o3', statistics_per_var={'o3': 'dma8eu', 'temp': 'maximum'})
return DataGenerator(os.path.join(os.path.dirname(__file__), 'data'), 'DEBW107', ['o3', 'temp'],
'datetime', 'variables', 'o3', statistics_per_var={'o3': 'dma8eu', 'temp': 'maximum'},
data_preparation=DataPrepJoin)
@pytest.fixture
def setup_with_gen(self, setup, gen):
......
......@@ -2,6 +2,7 @@ import logging
import pytest
from src.data_handling import DataPrepJoin
from src.data_handling.data_generator import DataGenerator
from src.helpers.datastore import NameNotFoundInScope
from src.helpers import PyTestRegex
......@@ -27,7 +28,8 @@ class TestPreProcessing:
@pytest.fixture
def obj_with_exp_setup(self):
ExperimentSetup(stations=['DEBW107', 'DEBY081', 'DEBW013', 'DEBW076', 'DEBW087', 'DEBW001'],
statistics_per_var={'o3': 'dma8eu', 'temp': 'maximum'}, station_type="background")
statistics_per_var={'o3': 'dma8eu', 'temp': 'maximum'}, station_type="background",
data_preparation=DataPrepJoin)
pre = object.__new__(PreProcessing)
super(PreProcessing, pre).__init__()
yield pre
......
......@@ -9,6 +9,7 @@ import mock
import pytest
from keras.callbacks import History
from src.data_handling import DataPrepJoin
from src.data_handling.data_distributor import Distributor
from src.data_handling.data_generator import DataGenerator
from src.helpers import PyTestRegex
......@@ -108,9 +109,9 @@ class TestTraining:
@pytest.fixture
def generator(self, path):
return DataGenerator(os.path.join(os.path.dirname(__file__), 'data'), 'AIRBASE',
['DEBW107'], ['o3', 'temp'], 'datetime', 'variables',
'o3', statistics_per_var={'o3': 'dma8eu', 'temp': 'maximum'})
return DataGenerator(os.path.join(os.path.dirname(__file__), 'data'), ['DEBW107'], ['o3', 'temp'], 'datetime',
'variables', 'o3', statistics_per_var={'o3': 'dma8eu', 'temp': 'maximum'},
data_preparation=DataPrepJoin)
@pytest.fixture
def model(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment