Skip to content
Snippets Groups Projects
Commit e922eb1c authored by Felix Kleinert's avatar Felix Kleinert
Browse files

move PartitionCheck to own module

parent 4ef3140c
Branches
Tags
3 merge requests!125Release v0.10.0,!124Update Master to new version v0.10.0,!97Felix issue106 hpc modules for juwels
...@@ -4,7 +4,8 @@ __date__ = '2019-11-14' ...@@ -4,7 +4,8 @@ __date__ = '2019-11-14'
import argparse import argparse
from src.run_modules.experiment_setup import ExperimentSetup, PartitionCheck from src.run_modules.experiment_setup import ExperimentSetup
from src.run_modules.partition_check import PartitionCheck
from src.run_modules.model_setup import ModelSetup from src.run_modules.model_setup import ModelSetup
from src.run_modules.post_processing import PostProcessing from src.run_modules.post_processing import PostProcessing
from src.run_modules.pre_processing import PreProcessing from src.run_modules.pre_processing import PreProcessing
......
...@@ -187,21 +187,6 @@ class ExperimentSetup(RunEnvironment): ...@@ -187,21 +187,6 @@ class ExperimentSetup(RunEnvironment):
self._set_param("statistics_per_var", stat_new) self._set_param("statistics_per_var", stat_new)
class PartitionCheck(RunEnvironment):
""" Checking if running on a HPC login node. The onöy reason to run on login nodes is to download data. Training and validation should happen on compute nodes"""
def __init__(self):
# create run framework
super().__init__()
self._run()
def _run(self):
if self.data_store.get('hostname')[:2] in self.data_store.get('login_nodes'):
raise OSError('You are on a login node to download data. Use compute nodes and run again if you want to train and validate a model.')
if __name__ == "__main__": if __name__ == "__main__":
formatter = '%(asctime)s - %(levelname)s: %(message)s [%(filename)s:%(funcName)s:%(lineno)s]' formatter = '%(asctime)s - %(levelname)s: %(message)s [%(filename)s:%(funcName)s:%(lineno)s]'
......
__author__ = "Felix Kleinert"
__date__ = '2020-04-07'
from src.run_modules.run_environment import RunEnvironment
class PartitionCheck(RunEnvironment):
"""
Checking if running on a HPC login node. The only reason to run on login nodes is to download data.
Training and validation should happen on compute nodes
"""
def __init__(self):
# create run framework
super().__init__()
self._run()
def _run(self):
if self.data_store.get('hostname')[:2] in self.data_store.get('login_nodes'):
raise OSError(
'You are on a login node to download data. Use compute nodes and run again if '
'you want to train and validate a model.')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment