llmsql-benchmark icon indicating copy to clipboard operation
llmsql-benchmark copied to clipboard

[CLI] Boolean flags with `action="store_true", default=True` cannot be disabled

Open DzmitryPihulski opened this issue 1 month ago • 5 comments

Problem

Several CLI flags are declared as action="store_true" with default=True, so they are always True and there is no way to turn them off from the command line:

  • llmsql/_cli/inference.py — --trust-remote-code (transformers & vLLM), --use-chat-template (vLLM), --do-sample for vLLM (default True)
  • llmsql/_cli/evaluate.py — --show-mismatches

Consequences: e.g. greedy decoding can't be requested for the vLLM CLI via --do-sample (only by passing --temperature 0), and remote code is always trusted.

Proposal

Use argparse.BooleanOptionalAction (Python ≥3.9) so both --flag and --no-flag exist, and add CLI tests for both forms.

Related: trust_remote_code=True by default is a security footgun (executes arbitrary code from the Hub). Consider defaulting to False in a minor release with a deprecation note.

Also: vLLM --do-sample uses add_common_generation_args(..., 1.0, True), and default_sample is typed int. The root parser's set_defaults(func=print_help) can never run, because subcommands are required=True. tests/cli/test_cli.py mocks the synchronous backends with AsyncMock, which causes "coroutine was never awaited" warnings; use MagicMock.

DzmitryPihulski avatar Oct 04 '26 05:10 DzmitryPihulski

Hi @DzmitryPihulski , I’m a first-time contributor and I’d like to work on this issue. Would it be okay if I picked it up?

Thanks!

satheesh142002 avatar Oct 04 '26 06:10 satheesh142002

Hi! I'd like to work on this issue as my first contribution to LLMSQL. I plan to update the boolean CLI flags to support explicit enable/disable behavior and add/adjust CLI tests for both forms. Please assign the issue to me if appropriate.

pradeep14012004 avatar Oct 04 '26 06:10 pradeep14012004

@satheesh142002 hi, sure, go ahead. @pradeep14012004 , sorry, first in first out

DzmitryPihulski avatar Oct 04 '26 06:10 DzmitryPihulski

Hi @DzmitryPihulski , thank you for assigning this issue to me. I noticed that @pradeep14012004 has already opened a PR for this issue. Since he have already completed the work, could you please consider reviewing their PR first? I’m happy to contribute to another issue if needed.

Thanks for your consideration!

satheesh142002 avatar Oct 04 '26 17:10 satheesh142002

Yes @satheesh142002 , since you was first (and you was assigned), go ahead and submit your PR

DzmitryPihulski avatar Oct 05 '26 16:10 DzmitryPihulski