Skip to content
Snippets Groups Projects
Commit e9b7cd01 authored by lukas leufen's avatar lukas leufen
Browse files

Merge branch 'lukas_issue145_feat_ml-param-reporting' into 'develop'

add last change

See merge request toar/machinelearningtools!123
parents fbb1ec46 155219ba
No related branches found
No related tags found
4 merge requests!125Release v0.10.0,!124Update Master to new version v0.10.0,!123add last change,!119Resolve "Include advanced data handling in workflow"
Pipeline #41067 passed
...@@ -156,8 +156,13 @@ class ModelSetup(RunEnvironment): ...@@ -156,8 +156,13 @@ class ModelSetup(RunEnvironment):
def report_model(self): def report_model(self):
model_settings = self.model.get_settings() model_settings = self.model.get_settings()
model_settings.update(self.model.compile_options)
df = pd.DataFrame(columns=["model setting"]) df = pd.DataFrame(columns=["model setting"])
for k, v in model_settings.items(): for k, v in model_settings.items():
if v is None:
continue
if isinstance(v, list):
v = ",".join(self._clean_name(str(u)) for u in v)
if "<" in str(v): if "<" in str(v):
v = self._clean_name(str(v)) v = self._clean_name(str(v))
df.loc[k] = v df.loc[k] = v
...@@ -172,6 +177,6 @@ class ModelSetup(RunEnvironment): ...@@ -172,6 +177,6 @@ class ModelSetup(RunEnvironment):
@staticmethod @staticmethod
def _clean_name(orig_name: str): def _clean_name(orig_name: str):
mod_name = re.sub(r'^{0}'.format(re.escape("<")), '', orig_name).replace("'", "").split(" ") mod_name = re.sub(r'^{0}'.format(re.escape("<")), '', orig_name).replace("'", "").split(" ")
mod_name = mod_name[1] if "class" in mod_name[0] else mod_name[0] 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 return mod_name[:-1] if mod_name[-1] == ">" else mod_name
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment