From 8ea8852933fb040b9c6f28d740e9eb447df18097 Mon Sep 17 00:00:00 2001 From: leufen1 <l.leufen@fz-juelich.de> Date: Wed, 7 Jul 2021 12:12:32 +0200 Subject: [PATCH] cleanup, remove outdated validate_station_old method --- mlair/run_modules/pre_processing.py | 32 ----------------------------- 1 file changed, 32 deletions(-) diff --git a/mlair/run_modules/pre_processing.py b/mlair/run_modules/pre_processing.py index c7d7f920..08bff85c 100644 --- a/mlair/run_modules/pre_processing.py +++ b/mlair/run_modules/pre_processing.py @@ -285,38 +285,6 @@ class PreProcessing(RunEnvironment): for k, v in attrs.items(): self.data_store.set(k, v) - def validate_station_old(self, data_handler: AbstractDataHandler, set_stations, set_name=None, - store_processed_data=True): - """ - Check if all given stations in `all_stations` are valid. - - Valid means, that there is data available for the given time range (is included in `kwargs`). The shape and the - loading time are logged in debug mode. - - :return: Corrected list containing only valid station IDs. - """ - t_outer = TimeTracking() - logging.info(f"check valid stations started{' (%s)' % (set_name if set_name is not None else 'all')}") - # calculate transformation using train data - if set_name == "train": - logging.info("setup transformation using train data exclusively") - self.transformation(data_handler, set_stations) - # start station check - collection = DataCollection() - valid_stations = [] - kwargs = self.data_store.create_args_dict(data_handler.requirements(), scope=set_name) - for station in set_stations: - try: - dp = data_handler.build(station, name_affix=set_name, store_processed_data=store_processed_data, - **kwargs) - collection.add(dp) - valid_stations.append(station) - except (AttributeError, EmptyQueryResult): - continue - logging.info(f"run for {t_outer} to check {len(set_stations)} station(s). Found {len(collection)}/" - f"{len(set_stations)} valid stations.") - return collection, valid_stations - def transformation(self, data_handler: AbstractDataHandler, stations): if hasattr(data_handler, "transformation"): kwargs = self.data_store.create_args_dict(data_handler.requirements(), scope="train") -- GitLab