jsonargparse
jsonargparse copied to clipboard
Implement minimal boilerplate CLIs derived from type hints and parse from command line, config files and environment variables
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....
## 🚀 Feature request Use Argument linking to link `init_args` to `dict_kwargs` ### Motivation I try to link `data.input_width` to `model.dict_kwargs.input_width` because transformer models need input image shape for model...
## 🐛 Bug report I have a master config that is formed from multiple other sub-configs stored in separate files (one for data, one for architecture etc.). When I specify...
## 🚀 Feature request Currently, while using CLI(), a bool param must be specified on the command line as `--flag true` or `--flag yes`. Is it possible to set it...
I'm curious about replacing argparse with jsonargparse in some of my projects since simply running `CLI(main_fn)` would cover my most common use cases. However, it's not clear to me if...
## 🚀 Feature request Add an option to fail on class initialization. ### Motivation Currently if a config contains a class_path with init_args, and it fails to initialize the class...
I'm designing a package that have main functionality and optional functionality that requires extra packages to be installed. I want to build a CLI for the package. `jsonargparse` dissuades use...
Sorry for all the questions. Please feel free to ignore it. I wonder if its possible to define, and then override/extend, yaml defaults inside other yamls. This is supported in...
I have a config file that I use with PyTorch Lightning's CLI. It has the form: config.yaml: ``` model: param1: val1 param2: val2 ``` corresponding to this I have a...
## What does this PR do? This is a proof of concept that allows for aliases in config files. I've found that it works in my use case, but I...