I was trying to run the endpoints cli in verbose mode. Since argparse enforces argument ordering, the following command works::
inference-endpoint -v -v benchmark online --concurrency 2 --endpoint http://localhost:1143 --model Qwen/Qwen2.5-1.5B --dataset tests/datasets/dummy_1k.pkl --num-samples 60 --output benchmark_results.json --report-path benchmark_report --workers 2 --load-pattern=poisson --target-qps 2
But this one fails:
inference-endpoint benchmark online -v -v --concurrency 2 --endpoint http://localhost:1143 --model Qwen/Qwen2.5-1.5B --dataset tests/datasets/dummy_1k.pkl --num-samples 60 --output benchmark_results.json --report-path benchmark_report --workers 2 --load-pattern=poisson --target-qps 2
This happened because -v is a global option and must appear before the command and subcommand.
To make this clearer to users, would it be helpful to expose the argument hierarchy in the documentation? For example(or maybe something smaller):
inference-endpoint
│
├── Global Options
│ ├── --version
│ └── --verbose, -v
│
├── benchmark
│ │
│ ├── offline
│ │ ├── Shared Benchmark Args
│ │ │ ├── --endpoint, -e
│ │ │ ├── --model
│ │ │ ├── --dataset, -d
│ │ │ ├── --api-key
│ │ │ ├── --workers
│ │ │ ├── --duration
│ │ │ ├── --num-samples
│ │ │ ├── --streaming
│ │ │ ├── --mode
│ │ │ ├── --min-output-tokens
│ │ │ ├── --max-output-tokens
│ │ │ └── --report-dir
│ │ │
│ │ └── Auxiliary Args
│ │ ├── --output, -o
│ │ └── --timeout
│ │
│ ├── online
│ │ ├── Shared Benchmark Args (same list as offline)
│ │ ├── Online-Specific Args
│ │ │ ├── --load-pattern
│ │ │ ├── --target-qps (required for poisson)
│ │ │ └── --concurrency (required for concurrency)
│ │ └── Auxiliary Args
│ │ ├── --output, -o
│ │ └── --timeout
│ │
│ └── from-config
│ ├── --config, -c (YAML file - required)
│ └── Auxiliary Args
│ ├── --output, -o
│ └── --timeout
│
├── eval
│ ├── --dataset
│ ├── --endpoint, -e
│ ├── --api-key
│ ├── --output, -o
│ └── --judge
│
├── probe
│ ├── --endpoint, -e
│ ├── --api-key
│ ├── --model
│ ├── --requests
│ └── --prompt
│
├── info
│ (no arguments)
│
├── validate
│ └── --config, -c
│
└── init
├── --template (offline|online|eval|submission)
└── --output, -o
I was trying to run the endpoints cli in
verbosemode. Since argparse enforces argument ordering, the following command works::But this one fails:
This happened because
-vis a global option and must appear before the command and subcommand.To make this clearer to users, would it be helpful to expose the argument hierarchy in the documentation? For example(or maybe something smaller):