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
566acef5
"docs/vscode:/vscode.git/clone" did not exist on "2a7881eaf3101e5b5975c3b99eef8a26e3b7e6d5"
Commit
566acef5
authored
Jul 01, 2024
by
lintangsutawika
Browse files
update multimodal args
parent
df137b46
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
lm_eval/api/task.py
lm_eval/api/task.py
+9
-2
No files found.
lm_eval/api/task.py
View file @
566acef5
...
@@ -1316,11 +1316,18 @@ class ConfigurableTask(Task):
...
@@ -1316,11 +1316,18 @@ class ConfigurableTask(Task):
elif
self
.
OUTPUT_TYPE
==
"generate_until"
:
elif
self
.
OUTPUT_TYPE
==
"generate_until"
:
arguments
=
(
ctx
,
deepcopy
(
self
.
config
.
generation_kwargs
))
arguments
=
(
ctx
,
deepcopy
(
self
.
config
.
generation_kwargs
))
multimodal_arg
=
{}
if
self
.
doc_to_visual
:
if
self
.
doc_to_visual
:
multimodal_arg
=
{
**
multimodal_arg
,
**
{
"visual"
:
self
.
doc_to_visual
(
doc
)},
}
if
bool
(
multimodal_arg
):
if
isinstance
(
arguments
,
list
):
if
isinstance
(
arguments
,
list
):
arguments
=
[
arg
+
(
self
.
doc_to_visual
(
doc
)
,)
for
arg
in
arguments
]
arguments
=
[
arg
+
(
multimodal_arg
,)
for
arg
in
arguments
]
else
:
else
:
arguments
=
arguments
+
(
self
.
doc_to_visual
(
doc
)
,)
arguments
=
arguments
+
(
multimodal_arg
,)
if
isinstance
(
arguments
,
type
):
if
isinstance
(
arguments
,
type
):
if
aux_arguments
is
not
None
:
if
aux_arguments
is
not
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