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
OpenDAS
opencompass
Commits
fb30b7c7
Unverified
Commit
fb30b7c7
authored
Nov 22, 2023
by
Fengzhe Zhou
Committed by
GitHub
Nov 22, 2023
Browse files
[Fix] Fix gen inferencer (#615)
parent
721a45c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
opencompass/openicl/icl_inferencer/icl_gen_inferencer.py
opencompass/openicl/icl_inferencer/icl_gen_inferencer.py
+2
-2
No files found.
opencompass/openicl/icl_inferencer/icl_gen_inferencer.py
View file @
fb30b7c7
...
@@ -130,8 +130,8 @@ class GenInferencer(BaseInferencer):
...
@@ -130,8 +130,8 @@ class GenInferencer(BaseInferencer):
entry
,
max_out_len
=
self
.
max_out_len
)
entry
,
max_out_len
=
self
.
max_out_len
)
generated
=
results
generated
=
results
num_return_sequences
=
self
.
model
.
get
(
'generation_kwargs'
,
{}).
get
(
num_return_sequences
=
getattr
(
self
.
model
,
'generation_kwargs'
,
'num_return_sequences'
,
1
)
{}).
get
(
'num_return_sequences'
,
1
)
# 5-3. Save current output
# 5-3. Save current output
for
prompt
,
prediction
,
gold
in
zip
(
for
prompt
,
prediction
,
gold
in
zip
(
parsed_entries
,
batched
(
generated
,
num_return_sequences
),
parsed_entries
,
batched
(
generated
,
num_return_sequences
),
...
...
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