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
2bb1b268
Unverified
Commit
2bb1b268
authored
Sep 16, 2025
by
Hongkuan Zhou
Committed by
GitHub
Sep 16, 2025
Browse files
fix: move deep_update function to trtllm folder (#3070)
Signed-off-by:
hongkuanz
<
hongkuanz@nvidia.com
>
parent
1ba53f2c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
16 deletions
+16
-16
benchmarks/profiler/utils/config.py
benchmarks/profiler/utils/config.py
+0
-15
components/backends/trtllm/src/dynamo/trtllm/main.py
components/backends/trtllm/src/dynamo/trtllm/main.py
+1
-1
components/backends/trtllm/src/dynamo/trtllm/utils/trtllm_utils.py
...s/backends/trtllm/src/dynamo/trtllm/utils/trtllm_utils.py
+15
-0
No files found.
benchmarks/profiler/utils/config.py
View file @
2bb1b268
...
...
@@ -159,21 +159,6 @@ def parse_override_engine_args(args: list[str]) -> tuple[dict, list[str]]:
return
override_dict
,
args
def
deep_update
(
target
:
dict
,
source
:
dict
)
->
None
:
"""
Recursively update nested dictionaries.
Args:
target: Dictionary to update
source: Dictionary with new values
"""
for
key
,
value
in
source
.
items
():
if
isinstance
(
value
,
dict
)
and
key
in
target
and
isinstance
(
target
[
key
],
dict
):
deep_update
(
target
[
key
],
value
)
else
:
target
[
key
]
=
value
class
ConfigModifierProtocol
(
Protocol
):
@
classmethod
def
convert_config
(
cls
,
config
:
dict
,
target
:
Literal
[
"prefill"
,
"decode"
])
->
dict
:
...
...
components/backends/trtllm/src/dynamo/trtllm/main.py
View file @
2bb1b268
...
...
@@ -23,7 +23,6 @@ from torch.cuda import device_count
from
transformers
import
AutoConfig
import
dynamo.nixl_connect
as
nixl_connect
from
benchmarks.profiler.utils.config
import
deep_update
from
dynamo.llm
import
ModelInput
,
ModelRuntimeConfig
,
ModelType
,
register_llm
from
dynamo.runtime
import
DistributedRuntime
,
dynamo_worker
from
dynamo.runtime.logging
import
configure_dynamo_logging
...
...
@@ -37,6 +36,7 @@ from dynamo.trtllm.request_handlers.handlers import (
from
dynamo.trtllm.utils.trtllm_utils
import
(
Config
,
cmd_line_args
,
deep_update
,
is_first_worker
,
parse_endpoint
,
)
...
...
components/backends/trtllm/src/dynamo/trtllm/utils/trtllm_utils.py
View file @
2bb1b268
...
...
@@ -368,3 +368,18 @@ def cmd_line_args():
config
.
tool_call_parser
=
args
.
dyn_tool_call_parser
return
config
def
deep_update
(
target
:
dict
,
source
:
dict
)
->
None
:
"""
Recursively update nested dictionaries.
Args:
target: Dictionary to update
source: Dictionary with new values
"""
for
key
,
value
in
source
.
items
():
if
isinstance
(
value
,
dict
)
and
key
in
target
and
isinstance
(
target
[
key
],
dict
):
deep_update
(
target
[
key
],
value
)
else
:
target
[
key
]
=
value
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