Closed yairf11 closed 2 years ago
Hi Yair, Great suggestion, let me give it a try and see how it goes
Added an option to pyrallis.dump
as suggested.
pyrallis.dump(cfg, omit_defaults=True)
The main downside is that, while concise, saving the partial config means that changing the default in your dataclass might have unexpected results on older configs.
Will merge into the master alongside some other planned changes.
Hi,
When serializing a dataclass, there are cases in which we would like the output to be as concise as possible, and omit config entries if their value is the default one.
What do you think about adding a parameter to the encode/dump functions so that this behavior could be toggled on/off by the user?