BUG: report model fails on empty list
Bug
Error description
Model setup fails as list index is out of range.
Error message
Traceback (most recent call last):
File "/p/project/deepacf/intelliaq/leufen1/demystify-temporal-components/run_experiment_MBRNN_c+0d_m+inf_fut_cEU.py", line 170, in <module>
main(args)
File "/p/project/deepacf/intelliaq/leufen1/demystify-temporal-components/run_experiment_MBRNN_c+0d_m+inf_fut_cEU.py", line 139, in main
workflow.run()
File "/p/home/jusers/leufen1/hdfml/intelliaq/mlair_tf2/mlair/mlair/workflows/abstract_workflow.py", line 31, in run
stage(**self._registry_kwargs[pos])
File "/p/home/jusers/leufen1/hdfml/intelliaq/mlair_tf2/mlair/mlair/run_modules/model_setup.py", line 70, in __init__
self._run()
File "/p/home/jusers/leufen1/hdfml/intelliaq/mlair_tf2/mlair/mlair/run_modules/model_setup.py", line 100, in _run
self.report_model()
File "/p/home/jusers/leufen1/hdfml/intelliaq/mlair_tf2/mlair/mlair/run_modules/model_setup.py", line 228, in report_model
if isinstance(v[0], dict):
IndexError: list index out of range
First guess on error origin
Check which parameter causes issue -> empty list as parameter, which cannot have element v[0]
Error origin
Solution
Add if statement to check for length of v if it is a list. In case the length is zero, just report empty list.