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
8cffa29b
Unverified
Commit
8cffa29b
authored
Aug 05, 2024
by
Baber Abbasi
Committed by
GitHub
Aug 05, 2024
Browse files
[hotfix] API: messages were created twice (#2174)
parent
0ce7734d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lm_eval/models/api_models.py
lm_eval/models/api_models.py
+2
-2
No files found.
lm_eval/models/api_models.py
View file @
8cffa29b
...
@@ -107,7 +107,7 @@ class TemplateAPI(TemplateLM):
...
@@ -107,7 +107,7 @@ class TemplateAPI(TemplateLM):
self
.
max_length
=
max_length
self
.
max_length
=
max_length
if
int
(
num_concurrent
)
<=
1
:
if
int
(
num_concurrent
)
<=
1
:
eval_logger
.
info
(
eval_logger
.
info
(
"Concurrent requests are disabled. To enable concurrent requests, set `num_concurrent > 1
`
."
"Concurrent requests are disabled. To enable concurrent requests, set `num_concurrent
`
> 1."
)
)
self
.
_concurrent
=
int
(
num_concurrent
)
self
.
_concurrent
=
int
(
num_concurrent
)
self
.
tokenizer_backend
=
tokenizer_backend
self
.
tokenizer_backend
=
tokenizer_backend
...
@@ -499,7 +499,7 @@ class TemplateAPI(TemplateLM):
...
@@ -499,7 +499,7 @@ class TemplateAPI(TemplateLM):
stop
=
stop_after_attempt
(
self
.
max_retries
),
stop
=
stop_after_attempt
(
self
.
max_retries
),
wait
=
wait_exponential
(
multiplier
=
0.5
,
min
=
1
,
max
=
10
),
wait
=
wait_exponential
(
multiplier
=
0.5
,
min
=
1
,
max
=
10
),
reraise
=
True
,
reraise
=
True
,
)(
self
.
model_call
)(
messages
=
self
.
create_message
(
inputs
)
,
generate
=
False
)
)(
self
.
model_call
)(
messages
=
inputs
,
generate
=
False
)
if
isinstance
(
outputs
,
dict
):
if
isinstance
(
outputs
,
dict
):
outputs
=
[
outputs
]
outputs
=
[
outputs
]
for
answer_
,
cache_key
in
zip
(
for
answer_
,
cache_key
in
zip
(
...
...
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