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
c6ed9386
Unverified
Commit
c6ed9386
authored
Feb 22, 2025
by
Robin
Committed by
GitHub
Feb 21, 2025
Browse files
[Bugfix][API Server] Fix invalid usage of 'ge' and 'le' in port valid… (#13672)
parent
0ffdf8ce
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
vllm/entrypoints/api_server.py
vllm/entrypoints/api_server.py
+1
-1
vllm/utils.py
vllm/utils.py
+11
-0
No files found.
vllm/entrypoints/api_server.py
View file @
c6ed9386
...
...
@@ -145,7 +145,7 @@ async def run_server(args: Namespace,
if
__name__
==
"__main__"
:
parser
=
FlexibleArgumentParser
()
parser
.
add_argument
(
"--host"
,
type
=
str
,
default
=
None
)
parser
.
add_argument
(
"--port"
,
type
=
int
,
default
=
8000
,
ge
=
1024
,
le
=
65535
)
parser
.
add_argument
(
"--port"
,
type
=
parser
.
check_port
,
default
=
8000
)
parser
.
add_argument
(
"--ssl-keyfile"
,
type
=
str
,
default
=
None
)
parser
.
add_argument
(
"--ssl-certfile"
,
type
=
str
,
default
=
None
)
parser
.
add_argument
(
"--ssl-ca-certs"
,
...
...
vllm/utils.py
View file @
c6ed9386
...
...
@@ -1194,6 +1194,17 @@ class FlexibleArgumentParser(argparse.ArgumentParser):
return
super
().
parse_args
(
processed_args
,
namespace
)
def
check_port
(
self
,
value
):
try
:
value
=
int
(
value
)
except
ValueError
:
raise
argparse
.
ArgumentTypeError
(
"Port must be an integer"
)
if
not
(
1024
<=
value
<=
65535
):
raise
argparse
.
ArgumentTypeError
(
"Port must be between 1024 and 65535"
)
return
value
def
_pull_args_from_config
(
self
,
args
:
List
[
str
])
->
List
[
str
]:
"""Method to pull arguments specified in the config file
into the command-line args variable.
...
...
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