Closed tkornuta-ibm closed 5 years ago
That's how I think it could be implemented properly:
del_default_params
and del_config_params
both in ParamInterface
and ParamRegistry
ParamRegistry
, where the deletion will be actually implemented, we would need the equivalent of update_dict_recursively([...])
but for deleting, but it will be much simpler, since there will be no recursion needed. Indeed, if you remove the root of any subtree, then all of its subtrees/leaves will be removed.__delitem__
for ParamInterface
, such that you can directly do del params[key]
to remove the entire subtree under key. The only issue here though is that it will be unclear (when reading the code) if it will delete the default or the config params, or both.
params[key]
, you get a value (leaf of the tree), instead of a new ParamInterface, and I don't if it is possible to call ParamInterface
's implementation of __delitem__
in that case.
TL;DR: We need an option to remove keys from registry, so they won't be present in the exported config file ;)
What we are facing is a problem with reproducible testing.