Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
cba50273
"vscode:/vscode.git/clone" did not exist on "e250ba3d99e1dc5289a3b652d3b64cce68d83397"
Unverified
Commit
cba50273
authored
Feb 08, 2024
by
Cody Yu
Committed by
GitHub
Feb 08, 2024
Browse files
Fix BaseCache metric (#170)
parent
a6aa46dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
python/sglang/srt/constrained/base_cache.py
python/sglang/srt/constrained/base_cache.py
+1
-1
No files found.
python/sglang/srt/constrained/base_cache.py
View file @
cba50273
...
...
@@ -24,7 +24,6 @@ class BaseCache:
self
.
metrics
[
"avg_init_time"
]
=
(
init_time
/
new_total
)
+
(
curr_total
/
new_total
)
*
self
.
metrics
[
"avg_init_time"
]
self
.
metrics
[
"total"
]
+=
1
return
val
if
key
in
self
.
cache
:
...
...
@@ -35,6 +34,7 @@ class BaseCache:
val
=
_init_with_timer
(
key
)
if
self
.
enable
:
self
.
metrics
[
"total"
]
+=
1
self
.
cache
[
key
]
=
val
return
val
...
...
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