From 7ee698ae575aea63e68ca3f188a5be85064ad933 Mon Sep 17 00:00:00 2001 From: leufen1 <l.leufen@fz-juelich.de> Date: Tue, 1 Mar 2022 19:14:13 +0100 Subject: [PATCH] model setup can now report better the layer configuration --- mlair/run_modules/model_setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mlair/run_modules/model_setup.py b/mlair/run_modules/model_setup.py index 98263eb7..2d6d8396 100644 --- a/mlair/run_modules/model_setup.py +++ b/mlair/run_modules/model_setup.py @@ -202,5 +202,6 @@ class ModelSetup(RunEnvironment): @staticmethod def _clean_name(orig_name: str): mod_name = re.sub(r'^{0}'.format(re.escape("<")), '', orig_name).replace("'", "").split(" ") - mod_name = mod_name[1] if any(map(lambda x: x in mod_name[0], ["class", "function", "method"])) else mod_name[0] - return mod_name[:-1] if mod_name[-1] == ">" else mod_name + mod_name = mod_name[1] if any(map(lambda x: x in mod_name[0], ["class", "function", "method"])) else mod_name + mod_name = mod_name[0] if len(mod_name) == 1 else mod_name + return mod_name[:-1] if mod_name[-1] == ">" else "".join(mod_name) -- GitLab