Open memray opened 11 months ago
Types like list[<subtype>]
are supported. The subtype could be simple, like an int
, or complex like a dataclass or a base class to accept subclasses. See for example pytorch lightning's callbacks (LightningCLI is jsonargparse under the hood). The config above doesn't look like a list. Looks more like nested dataclasses, which are also supported.
Note that jsonargparse was developed based on machine learning needs and most of its users are from this community. Depending on what you want, I could advice how to best proceed. Feel free to ask.
Hi there,
Great tool! I wonder if it is possible to load/dump configs as a list of nested objects/dataclasses, like the data shown below? It's quite common for ML projects. Thanks! https://github.com/OpenNMT/OpenNMT-py/blob/master/data/features_data.yaml