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

fix list bug

parent a37d00bb
No related branches found
No related tags found
5 merge requests!480Merge multiple stats into crps working branch,!470Develop,!469Resolve "BUG: report model fails on empty list",!467Resolve "release v2.2.0",!466Draft: Resolve "Include CRPS analysis and other ens verif methods or plots"
Pipeline #108815 passed
......@@ -75,7 +75,7 @@ class CNNfromConfig(AbstractModelClass):
# apply to model
self.set_model()
self.set_compile_options()
self.set_custom_objects(loss=custom_loss([keras.losses.mean_squared_error, var_loss]), var_loss=var_loss)
self.set_custom_objects(loss=self.compile_options["loss"][0], var_loss=var_loss)
def set_model(self):
x_input = keras.layers.Input(shape=self._input_shape)
......
......@@ -224,10 +224,13 @@ class ModelSetup(RunEnvironment):
if v is None:
continue
if isinstance(v, list):
if len(v) > 0:
if isinstance(v[0], dict):
v = ["{" + vi + "}" for vi in [",".join(f"{_f(str(uk))}:{_f(str(uv))}" for uk, uv in d.items()) for d in v]]
else:
v = ",".join(_f(str(u)) for u in v)
else:
v = "[]"
if "<" in str(v):
v = _f(str(v))
df.loc[k] = str(v)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment