Closed PeppeRu96 closed 5 months ago
I believe this can be closed. It no longers occurs with the current version:
$ ./mytest --strategy=gather_reduce --model_dir=./models/baseline_table/trows-100_seqlen-1_cores-32_bs-512/ && echo $?
0
Solved with the current version.
@p-ranav @rouault I have the same error with version 3.0, I think that it is not released yet (seems to work with the latest dev version).
subcommand.add_argument("-v", "--verbose")
.help("verbose output")
.flag();
subcommand.add_argument("--output-format")
.default_value(string("png"))
.choices("png", "jpg")
.nargs(1)
.help("format of generated file [png|jpg]");
my_program subcommand --output-format png test
Invalid argument "test" - allowed options: {png, jpg}
If you have two arguments (string), one with a choices() clause and the other without it, parsing fails saying that the argument without .choices() has invalid arguments and that the argument must be chosen from the options of the other argument (the one with .choises()).. Code: ` // Argument parser argparse::ArgumentParser parser("NPULookup");
Invokation: ./npu_lookup --strategy=gather_reduce --model_dir=./models/baseline_table/trows-100_seqlen-1_cores-32_bs-512/ Output: **Invalid argument "--model_dir" - allowed options: {asymmetric, gather_reduce} Usage: NPULookup [--help] [--version] --model_dir VAR --strategy VAR
Optional arguments: -h, --help shows help message and exits -v, --version prints version information and exits --model_dir [required] --strategy [required]**