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
8bff2285
Commit
8bff2285
authored
Jul 01, 2024
by
lintangsutawika
Browse files
remove input_type
parent
407339c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
14 deletions
+0
-14
lm_eval/api/task.py
lm_eval/api/task.py
+0
-14
No files found.
lm_eval/api/task.py
View file @
8bff2285
...
...
@@ -48,10 +48,6 @@ ALL_OUTPUT_TYPES = [
"generate_until"
,
]
ALL_INPUT_TYPES
=
[
"text"
,
"text_image"
,
]
eval_logger
=
logging
.
getLogger
(
"lm-eval"
)
...
...
@@ -93,7 +89,6 @@ class TaskConfig(dict):
# scoring options
metric_list
:
Optional
[
list
]
=
None
output_type
:
OutputType
=
"generate_until"
input_type
:
InputType
=
"text"
generation_kwargs
:
Optional
[
dict
]
=
None
repeats
:
int
=
1
filter_list
:
Optional
[
Union
[
str
,
list
]]
=
None
...
...
@@ -733,13 +728,6 @@ class ConfigurableTask(Task):
)
self
.
OUTPUT_TYPE
=
self
.
config
.
output_type
if
self
.
config
.
input_type
is
not
None
:
if
self
.
config
.
input_type
not
in
ALL_INPUT_TYPES
:
raise
ValueError
(
f
"Got invalid output_type '
{
self
.
config
.
input_type
}
', must be in '
{
','
.
join
(
ALL_INPUT_TYPES
)
}
'"
)
self
.
INPUT_TYPE
=
self
.
config
.
input_type
if
self
.
config
.
dataset_path
is
not
None
:
self
.
DATASET_PATH
=
self
.
config
.
dataset_path
...
...
@@ -1359,7 +1347,6 @@ class ConfigurableTask(Task):
return
Instance
(
request_type
=
self
.
OUTPUT_TYPE
,
input_type
=
self
.
INPUT_TYPE
,
doc
=
doc
,
arguments
=
arguments
,
idx
=
0
,
...
...
@@ -1571,7 +1558,6 @@ class ConfigurableTask(Task):
f
"ConfigurableTask(task_name=
{
getattr
(
self
.
config
,
'task'
,
None
)
}
,"
f
"group_name=
{
getattr
(
self
.
config
,
'group'
,
None
)
}
,"
f
"output_type=
{
self
.
OUTPUT_TYPE
}
,"
f
"input_type=
{
self
.
INPUT_TYPE
}
"
,
f
"num_fewshot=
{
getattr
(
self
.
config
,
'num_fewshot'
,
None
)
}
,"
f
"num_samples=
{
len
(
self
.
eval_docs
)
}
)"
,
)
...
...
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