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
18849126
Unverified
Commit
18849126
authored
Nov 24, 2023
by
Hubert
Committed by
GitHub
Nov 24, 2023
Browse files
[Bug] fix icl eval with nested list (#632)
parent
81b67e8d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
opencompass/tasks/openicl_eval.py
opencompass/tasks/openicl_eval.py
+5
-7
No files found.
opencompass/tasks/openicl_eval.py
View file @
18849126
...
...
@@ -135,13 +135,11 @@ class OpenICLEvalTask(BaseTask):
'The prediction for Self-Consistency'
'must be list.'
)
if
pred_list_flag
:
for
pred
in
pred_strs
:
pred_strs
.
append
([
self
.
_extract_role_pred
(
_pred
,
role
.
get
(
'begin'
,
None
),
pred_strs
=
[[
self
.
_extract_role_pred
(
_pred
,
role
.
get
(
'begin'
,
None
),
role
.
get
(
'end'
,
None
))
for
_pred
in
pred
])
]
for
pred
in
pred_strs
]
else
:
pred_strs
=
[
self
.
_extract_role_pred
(
pred
,
role
.
get
(
'begin'
,
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