A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 11, 21:15 UTC
[Frontend] Remove confusing -O.xx flag error (#30169)
Signed-off-by: Yanan Cao <gmagogsfm@gmail.com>
Yanan Cao committed
Dec 6, 2025 at 18:53 UTC
cbedb703cc594632db796f9ca748ea4b7b4e8435
2 files changed
-26
tests/utils_/test_argparse_utils.py
-19
@@ -458,22 +458,3 @@ def test_flat_product():
458
(3, 4, "a", 5, 6),
459
(3, 4, "b", 5, 6),
460
]
461
-
462
-
463
-def test_o_dotted_syntax_error():
464
- """Test that -O.* dotted syntax raises a clear error message."""
465
- parser = FlexibleArgumentParser()
466
- parser.add_argument("-cc", "--compilation-config", type=json.loads)
467
-
468
- # Test that -O.* syntax raises a clear ValueError
469
- with pytest.raises(ValueError, match=r"The -O\.\* syntax is no longer supported"):
470
- parser.parse_args(["-O.backend=eager"])
471
-
472
- with pytest.raises(ValueError, match=r"Please use -cc\.\* instead"):
473
- parser.parse_args(["-O.mode=2"])
474
-
475
- with pytest.raises(
476
- ValueError,
477
- match=r"replace '-O\.cudagraph_mode=NONE' with '-cc\.cudagraph_mode=NONE'",
478
- ):
479
- parser.parse_args(["-O.cudagraph_mode=NONE"])
vllm/utils/argparse_utils.py
-7
@@ -244,13 +244,6 @@ class FlexibleArgumentParser(ArgumentParser):
244
else:
245
key = pattern.sub(repl, arg, count=1)
246
processed_args.append(key)
247
- elif arg.startswith("-O."):
248
- # Provide clear error for deprecated -O.* syntax
249
- raise ValueError(
250
- f"The -O.* syntax is no longer supported. "
251
- f"Please use -cc.* instead. "
252
- f"For example, replace '{arg}' with '{arg.replace('-O', '-cc', 1)}'"
253
- )
247
elif arg.startswith("-O") and arg != "-O":
248
# allow -O flag to be used without space, e.g. -O3 or -Odecode
249
# also handle -O=<optimization_level> here