Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
cbedb703
Unverified
Commit
cbedb703
authored
Dec 06, 2025
by
Yanan Cao
Committed by
GitHub
Dec 07, 2025
Browse files
[Frontend] Remove confusing -O.xx flag error (#30169)
Signed-off-by:
Yanan Cao
<
gmagogsfm@gmail.com
>
parent
8d3da4c7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
26 deletions
+0
-26
tests/utils_/test_argparse_utils.py
tests/utils_/test_argparse_utils.py
+0
-19
vllm/utils/argparse_utils.py
vllm/utils/argparse_utils.py
+0
-7
No files found.
tests/utils_/test_argparse_utils.py
View file @
cbedb703
...
@@ -458,22 +458,3 @@ def test_flat_product():
...
@@ -458,22 +458,3 @@ def test_flat_product():
(
3
,
4
,
"a"
,
5
,
6
),
(
3
,
4
,
"a"
,
5
,
6
),
(
3
,
4
,
"b"
,
5
,
6
),
(
3
,
4
,
"b"
,
5
,
6
),
]
]
def
test_o_dotted_syntax_error
():
"""Test that -O.* dotted syntax raises a clear error message."""
parser
=
FlexibleArgumentParser
()
parser
.
add_argument
(
"-cc"
,
"--compilation-config"
,
type
=
json
.
loads
)
# Test that -O.* syntax raises a clear ValueError
with
pytest
.
raises
(
ValueError
,
match
=
r
"The -O\.\* syntax is no longer supported"
):
parser
.
parse_args
([
"-O.backend=eager"
])
with
pytest
.
raises
(
ValueError
,
match
=
r
"Please use -cc\.\* instead"
):
parser
.
parse_args
([
"-O.mode=2"
])
with
pytest
.
raises
(
ValueError
,
match
=
r
"replace '-O\.cudagraph_mode=NONE' with '-cc\.cudagraph_mode=NONE'"
,
):
parser
.
parse_args
([
"-O.cudagraph_mode=NONE"
])
vllm/utils/argparse_utils.py
View file @
cbedb703
...
@@ -244,13 +244,6 @@ class FlexibleArgumentParser(ArgumentParser):
...
@@ -244,13 +244,6 @@ class FlexibleArgumentParser(ArgumentParser):
else
:
else
:
key
=
pattern
.
sub
(
repl
,
arg
,
count
=
1
)
key
=
pattern
.
sub
(
repl
,
arg
,
count
=
1
)
processed_args
.
append
(
key
)
processed_args
.
append
(
key
)
elif
arg
.
startswith
(
"-O."
):
# Provide clear error for deprecated -O.* syntax
raise
ValueError
(
f
"The -O.* syntax is no longer supported. "
f
"Please use -cc.* instead. "
f
"For example, replace '
{
arg
}
' with '
{
arg
.
replace
(
'-O'
,
'-cc'
,
1
)
}
'"
)
elif
arg
.
startswith
(
"-O"
)
and
arg
!=
"-O"
:
elif
arg
.
startswith
(
"-O"
)
and
arg
!=
"-O"
:
# allow -O flag to be used without space, e.g. -O3 or -Odecode
# allow -O flag to be used without space, e.g. -O3 or -Odecode
# also handle -O=<optimization_level> here
# also handle -O=<optimization_level> here
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment