Closed heborras closed 1 year ago
Is this the only place where a non-string key causes troubles?
Is this the only place where a non-string key causes troubles?
As far as I can tell this is the only place. I also tested this fix with non-string values at the root-level of the configuration and that worked just fine.
Reference issue
None yet.
What does this implement/fix?
Hi, this is a bit of a strange bug, but the fix is quite simple.
The dictionaries created from reading in .yaml files can legally contain keys, which are not strings, e.g. integers. However, the current implementation of flatten only handles string keys: https://github.com/TUM-DAML/seml/blob/1ac4b06fcace4014dae5b9ea2d75cdc9c44daf81/seml/utils.py#L125
And thus seml will crash, when adding a config file, which contains integers as keys. With the following error:
To fix this issue the PR explicitly converts any key to a string.
Additional information
The config file, which I used and which contains integers as keys is attached here: mlp_mapped_noise_experiment.yaml.zip
This should reproduce the error above on the current master branch.