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
dynamo
Commits
04cecda7
"launch/dynamo-run/src/vscode:/vscode.git/clone" did not exist on "2fa506daa1039b347ca686cb079e88fa0d2f10ba"
Unverified
Commit
04cecda7
authored
Jan 20, 2026
by
ishandhanani
Committed by
GitHub
Jan 20, 2026
Browse files
fix(sglang): Fix YAML config parsing for store_true arguments (#5513)
parent
748fee6b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
9 deletions
+21
-9
components/src/dynamo/sglang/args.py
components/src/dynamo/sglang/args.py
+21
-9
No files found.
components/src/dynamo/sglang/args.py
View file @
04cecda7
...
@@ -372,14 +372,26 @@ async def parse_args(args: list[str]) -> Config:
...
@@ -372,14 +372,26 @@ async def parse_args(args: list[str]) -> Config:
# Remove --config-key from args (not recognized by SGLang)
# Remove --config-key from args (not recognized by SGLang)
args
=
args
[:
key_index
]
+
args
[
key_index
+
2
:]
args
=
args
[:
key_index
]
+
args
[
key_index
+
2
:]
# Extract boolean actions from the parser to handle them correctly in YAML
# Merge config file arguments with CLI arguments.
boolean_actions
=
[]
# ConfigArgumentMerger API changed after SGLang v0.5.7:
for
action
in
parser
.
_actions
:
# - New API (post-v0.5.7): accepts parser= for proper store_true detection
if
hasattr
(
action
,
"dest"
)
and
hasattr
(
action
,
"action"
):
# - Old API (v0.5.7 and earlier): only accepts boolean_actions=
if
action
.
action
in
[
"store_true"
,
"store_false"
]:
# We use inspect.signature to detect the API rather than version checking
boolean_actions
.
append
(
action
.
dest
)
# since unreleased builds may have the new API while still reporting v0.5.7.
# Related upstream issue: https://github.com/sgl-project/sglang/issues/16256
# Merge config file arguments with CLI arguments
# Upstream fix PR: https://github.com/sgl-project/sglang/pull/16638
import
inspect
sig
=
inspect
.
signature
(
ConfigArgumentMerger
.
__init__
)
if
"parser"
in
sig
.
parameters
:
config_merger
=
ConfigArgumentMerger
(
parser
=
parser
)
else
:
# Legacy path: extract store_true actions manually
boolean_actions
=
[
action
.
dest
for
action
in
parser
.
_actions
if
isinstance
(
action
,
argparse
.
_StoreTrueAction
)
]
config_merger
=
ConfigArgumentMerger
(
boolean_actions
=
boolean_actions
)
config_merger
=
ConfigArgumentMerger
(
boolean_actions
=
boolean_actions
)
args
=
config_merger
.
merge_config_with_args
(
args
)
args
=
config_merger
.
merge_config_with_args
(
args
)
...
...
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