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
gaoqiong
lm-evaluation-harness
Commits
7ffb74ce
"llm/vscode:/vscode.git/clone" did not exist on "3b4bab3dc55c615a14b1ae74ea64815d3891b5b0"
Commit
7ffb74ce
authored
Jun 28, 2023
by
haileyschoelkopf
Browse files
make cache-loading msg part of logger
parent
b2fb53d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
lm_eval/api/model.py
lm_eval/api/model.py
+4
-2
No files found.
lm_eval/api/model.py
View file @
7ffb74ce
...
@@ -180,7 +180,9 @@ class CachingLM:
...
@@ -180,7 +180,9 @@ class CachingLM:
remaining_reqs
=
[]
remaining_reqs
=
[]
warned
=
False
warned
=
False
# figure out which ones are cached and which ones are new
# figure out which ones are cached and which ones are new
print
(
f
"Loading '
{
attr
}
' responses from cache '
{
self
.
cache_db
}
' where possible"
)
eval_logger
.
info
(
f
"Loading '
{
attr
}
' responses from cache '
{
self
.
cache_db
}
' where possible..."
)
for
req
in
tqdm
(
requests
):
for
req
in
tqdm
(
requests
):
hsh
=
hash_args
(
attr
,
req
.
args
)
hsh
=
hash_args
(
attr
,
req
.
args
)
if
attr
==
"greedy_until"
and
req
.
args
[
1
].
get
(
"do_sample"
,
False
):
if
attr
==
"greedy_until"
and
req
.
args
[
1
].
get
(
"do_sample"
,
False
):
...
@@ -188,7 +190,7 @@ class CachingLM:
...
@@ -188,7 +190,7 @@ class CachingLM:
# (else every "randomly sampled" generation would be identical for repeats > 1).
# (else every "randomly sampled" generation would be identical for repeats > 1).
if
not
warned
:
if
not
warned
:
eval_logger
.
warning
(
eval_logger
.
warning
(
f
"Arguments to lm.greedy_until() '
{
req
.
args
[
1
]
}
' include non-deterministic sampling. Caching will not be performed."
f
"Arguments to lm.greedy_until() '
{
req
.
args
[
1
]
}
' include non-deterministic sampling. Caching will not be performed
for such requests
."
)
)
warned
=
True
warned
=
True
res
.
append
(
None
)
res
.
append
(
None
)
...
...
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