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
9e05252b
Unverified
Commit
9e05252b
authored
Nov 20, 2024
by
Yanyi Liu
Committed by
GitHub
Nov 20, 2024
Browse files
[Misc] Add __setitem__ for LazyDict (#10469)
Signed-off-by:
Yanyi Liu
<
wolfsonliu@163.com
>
parent
d200972e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
vllm/utils.py
vllm/utils.py
+3
-0
No files found.
vllm/utils.py
View file @
9e05252b
...
...
@@ -1491,6 +1491,9 @@ class LazyDict(Mapping, Generic[T]):
self
.
_dict
[
key
]
=
self
.
_factory
[
key
]()
return
self
.
_dict
[
key
]
def
__setitem__
(
self
,
key
:
str
,
value
:
Callable
[[],
T
]):
self
.
_factory
[
key
]
=
value
def
__iter__
(
self
):
return
iter
(
self
.
_factory
)
...
...
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