From c474a3e4a241ce0d3a221b491262a01ccd359df0 Mon Sep 17 00:00:00 2001 From: MStarmans91 Date: Fri, 11 Mar 2022 17:10:59 +0100 Subject: [PATCH] Add snellius detectors instead of cartesius --- WORC/detectors/detectors.py | 4 ++-- WORC/facade/helpers/configbuilder.py | 4 ++-- WORC/facade/simpleworc.py | 6 +++--- WORC/plotting/plot_estimator_performance.py | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/WORC/detectors/detectors.py b/WORC/detectors/detectors.py index 08559bb8..151b7f30 100644 --- a/WORC/detectors/detectors.py +++ b/WORC/detectors/detectors.py @@ -64,11 +64,11 @@ def _is_detected(self, *args, **kwargs): return False -class CartesiusClusterDetector(AbstractDetector): +class SnelliusClusterDetector(AbstractDetector): def _is_detected(self): if LinuxDetector()._is_detected(): try: - if 'cartesius' in Path('/etc/hosts').read_text(): + if 'localhost6.localdomain6' in Path('/etc/hosts').read_text(): return True except: return False diff --git a/WORC/facade/helpers/configbuilder.py b/WORC/facade/helpers/configbuilder.py index 077902c3..3b905320 100644 --- a/WORC/facade/helpers/configbuilder.py +++ b/WORC/facade/helpers/configbuilder.py @@ -16,7 +16,7 @@ # limitations under the License. from WORC import WORC -from WORC.detectors.detectors import BigrClusterDetector, CartesiusClusterDetector, DebugDetector +from WORC.detectors.detectors import BigrClusterDetector, SnelliusClusterDetector, DebugDetector import configparser import fastr import collections.abc @@ -74,7 +74,7 @@ def _cluster_config_overrides(self): 'fastr_plugin': 'DRMAAExecution'}, 'HyperOptimization': {'n_jobspercore': '200'} } - elif CartesiusClusterDetector().do_detection(): + elif SnelliusClusterDetector().do_detection(): overrides = { 'Classification': {'fastr': 'True', 'fastr_plugin': 'ProcessPoolExecution'}, diff --git a/WORC/facade/simpleworc.py b/WORC/facade/simpleworc.py index 8688c739..72c5265d 100644 --- a/WORC/facade/simpleworc.py +++ b/WORC/facade/simpleworc.py @@ -28,7 +28,7 @@ from WORC.addexceptions import WORCKeyError, WORCValueError, WORCAssertionError from .helpers.configbuilder import ConfigBuilder from WORC.detectors.detectors import CsvDetector, BigrClusterDetector, \ - CartesiusClusterDetector + SnelliusClusterDetector from WORC.validators.preflightcheck import ValidatorsFactory from functools import wraps @@ -115,7 +115,7 @@ def __init__(self, name='WORC'): # Detect wether we are on a cluster if BigrClusterDetector().do_detection(): self._worc.fastr_plugin = 'DRMAAExecution' - elif CartesiusClusterDetector().do_detection(): + elif SnelliusClusterDetector().do_detection(): self._worc.fastr_plugin = 'ProcessPoolExecution' def set_fixed_splits(self, fixed_splits_csv): @@ -633,7 +633,7 @@ def set_multicore_execution(self): is enabled, jobs are parallellized over all available cores, which majorly speeds up the computation. - Note: SimpleWORC has an automatic detector for the BIGR and Cartesius cluster. Hence, + Note: SimpleWORC has an automatic detector for the BIGR and Snellius cluster. Hence, on those clusters, do not use the multicore execution, as this will overwrite the changes applied by the detectors. """ diff --git a/WORC/plotting/plot_estimator_performance.py b/WORC/plotting/plot_estimator_performance.py index 9646923e..ef087da8 100644 --- a/WORC/plotting/plot_estimator_performance.py +++ b/WORC/plotting/plot_estimator_performance.py @@ -470,7 +470,7 @@ def plot_estimator_performance(prediction, label_data, label_type, thresholds_val = fit_thresholds(thresholds, fitted_model, label_type, X_train_temp, - Y_train_temp, esemble_method, + Y_train_temp, ensemble_method, ensemble_size, ensemble_scoring) for pnum in range(len(y_score)):