[CLI] Improve CLI arg parsing for -O/--compilation-config (#20156)
Signed-off-by: luka <luka@neuralmagic.com>
This commit is contained in:
@@ -202,7 +202,10 @@ def _compute_kwargs(cls: ConfigType) -> dict[str, Any]:
|
||||
passed individually. For example, the following sets of arguments are
|
||||
equivalent:\n\n
|
||||
- `--json-arg '{"key1": "value1", "key2": {"key3": "value2"}}'`\n
|
||||
- `--json-arg.key1 value1 --json-arg.key2.key3 value2`\n\n"""
|
||||
- `--json-arg.key1 value1 --json-arg.key2.key3 value2`\n
|
||||
Additionally, list elements can be passed individually using '+':
|
||||
- `--json-arg '{"key4": ["value3", "value4", "value5"]}'`\n
|
||||
- `--json-arg.key4+ value3 --json-arg.key4+='value4,value5'`\n\n"""
|
||||
if dataclass_cls is not None:
|
||||
|
||||
def parse_dataclass(val: str, cls=dataclass_cls) -> Any:
|
||||
|
||||
Reference in New Issue
Block a user