jsonargparse
jsonargparse copied to clipboard
Implement minimal boilerplate CLIs derived from type hints and parse from command line, config files and environment variables
## 🐛 Bug report When using an optional dataclass, fields specified first will be wiped by later fields specification. ### To reproduce ```python from dataclasses import dataclass from jsonargparse import...
## 🚀 Feature request Given this simple parser setup, is it possible to parse values that are paths to python variables that resolve the the requested type? ``` parser =...
## 🚀 Feature request The documentation [describes](https://jsonargparse.readthedocs.io/en/stable/index.html#dataclass-like-classes) how dataclass-like classes are "not expected to have subclasses", and therefore do not accept specifying a `class_path`. However `dataclasses.dataclass` does support inheritance: [python...
## 🚀 Feature request Currently, CLI() uses [short_description from the parsed docstring](https://github.com/omni-us/jsonargparse/blob/4c310ac7d2dde535a13ef6878844dcc15e20d39e/jsonargparse/_cli.py#L122) I would like an option to include the long description in the help string. ### Motivation Sometimes there...
I'm trying to parse a arg that is a list of dict use the comand line tool: The yaml: ```yaml # part of the config.yaml model: augmentations: - a: random_crop...
In the following example ```python from dataclasses import dataclass from typing import Optional from jsonargparse import ArgumentParser @dataclass class Config: a: int b: float = 2.0 if __name__ == "__main__":...
## 🚀 Feature request Allow to overwrite subconfig arguments. For example: `evaluate.yaml`: ```yaml model: model.yaml data: path/to/data ``` `model.yaml`: ```yaml class_path: path.to.Model init_args: a: 1 b: 2 c: 3 d:...
## 🚀 Feature request We can init an object with keyword parameters already, which is very helpful. An example: ```yaml encoders: class_path: torch.nn.ModuleDict init_args: modules: table: class_path: torch.nn.TransformerEncoder init_args: encoder_layer:...
## 🚀 Feature request Hierarchy-level **--help** format: There are many advantages to jsonargparse, and I'm a big fan of it. However, jsonargparse also has its drawbacks, and I believe one...
Again, thanks for all your great work on this project. Despite opening a couple of issues I really want to point out how much I dig your way of defining...