Closed zhiruiluo closed 1 year ago
I have proposed a PR #197 to this feature request.
Hey there @zhiruiluo , the feature is already implemented here: https://github.com/lebrice/SimpleParsing/blob/master/simple_parsing/helpers/hparams/hyperparameters.py#L200
It could be moved somewhere else and made more broadly available. I'll take a look at your PR and I'll add any comments there, then come back here after.
simple_parsing.replace
has been merged in #212
Is your feature request related to a problem? Please describe. The replace function of the dataclasses module has the signature of Dataclasses.replace(obj, /, **changes):
However, the Dataclass.replace doesn't work with nested dataclasses, subgroups, and other features in simple-parsing. To solve this, the simple_parsing.replace should be supplemented as an extension to dataclasses.replace.
Describe the solution you'd like We can use the
parse
API to implement this feature.Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context With
simple_parsing.replace
, we can make this example work.