lookup_dict = {
f'config.{key}': value for key, value in config.items()
}
Once you have nested dictionaries here, MongoDB no longer correctly parses the query which uses the above dict as filter dict. This can be fixed by replacing those three lines with, for example:
Expected Behavior
seml XXX add YYY --no-hash
should do the same thing asseml XXX add YYY
.Actual Behavior
It doesn't once you have nested entries in your config; specifically, in these cases, it adds duplicate configs to the database.
Fix
The offending statement is (https://github.com/TUM-DAML/seml/blob/master/seml/add.py#L43-L45):
Once you have nested dictionaries here, MongoDB no longer correctly parses the query which uses the above dict as filter dict. This can be fixed by replacing those three lines with, for example:
where
flatten
is imported fromseml.utils
.