Skip to content
Snippets Groups Projects
Commit 925886c4 authored by leufen1's avatar leufen1
Browse files

added check for model display name and competitors to solve unique problem in...

added check for model display name and competitors to solve unique problem in postprocessing, \close #366
parent 58903e8d
No related branches found
No related tags found
6 merge requests!430update recent developments,!413update release branch,!412Resolve "release v2.0.0",!401added check for model display name and competitors to solve unique problem in...,!400Resolve "BUG: workflow failure on HPC during clim skill score calcuation",!399Resolve "BUG: workflow failure on HPC during clim skill score calcuation"
Pipeline #93488 passed
...@@ -389,6 +389,10 @@ class ExperimentSetup(RunEnvironment): ...@@ -389,6 +389,10 @@ class ExperimentSetup(RunEnvironment):
self._set_param("neighbors", ["DEBW030"]) # TODO: just for testing self._set_param("neighbors", ["DEBW030"]) # TODO: just for testing
# set competitors # set competitors
if model_display_name is not None and model_display_name in competitors:
raise IndexError(f"Given model_display_name {model_display_name} is also present in the competitors "
f"variable {competitors}. To assure a proper workflow it is required to have unique names "
f"for each model and competitor. Please use a different model display name or competitor.")
self._set_param("competitors", competitors, default=[]) self._set_param("competitors", competitors, default=[])
competitor_path_default = os.path.join(self.data_store.get("data_path"), "competitors", competitor_path_default = os.path.join(self.data_store.get("data_path"), "competitors",
"_".join(self.data_store.get("target_var"))) "_".join(self.data_store.get("target_var")))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment