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
57d0718a
Commit
57d0718a
authored
Dec 24, 2021
by
Jonathan Tow
Browse files
Remove all `provide_description` argument uses
parent
a34bbe69
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
5 deletions
+2
-5
lm_eval/tasks/truthfulqa.py
lm_eval/tasks/truthfulqa.py
+2
-4
scripts/cost_estimate.py
scripts/cost_estimate.py
+0
-1
No files found.
lm_eval/tasks/truthfulqa.py
View file @
57d0718a
...
@@ -85,12 +85,11 @@ class TruthfulQAMultipleChoice(Task):
...
@@ -85,12 +85,11 @@ class TruthfulQAMultipleChoice(Task):
def
doc_to_target
(
self
,
doc
):
def
doc_to_target
(
self
,
doc
):
return
" "
return
" "
def
fewshot_context
(
self
,
doc
,
num_fewshot
,
provide_description
,
rnd
,
description
=
None
):
def
fewshot_context
(
self
,
doc
,
num_fewshot
,
provide_description
=
None
,
rnd
=
None
,
description
=
None
):
assert
num_fewshot
==
0
,
"TruthfulQA is intended only for the zero-shot setting."
assert
num_fewshot
==
0
,
"TruthfulQA is intended only for the zero-shot setting."
return
super
().
fewshot_context
(
return
super
().
fewshot_context
(
doc
=
doc
,
doc
=
doc
,
num_fewshot
=
num_fewshot
,
num_fewshot
=
num_fewshot
,
provide_description
=
provide_description
,
rnd
=
rnd
,
rnd
=
rnd
,
description
=
description
description
=
description
)
)
...
@@ -223,12 +222,11 @@ class TruthfulQAGeneration(Task):
...
@@ -223,12 +222,11 @@ class TruthfulQAGeneration(Task):
def
doc_to_target
(
self
,
doc
):
def
doc_to_target
(
self
,
doc
):
return
" "
return
" "
def
fewshot_context
(
self
,
doc
,
num_fewshot
,
provide_description
,
rnd
,
description
=
None
):
def
fewshot_context
(
self
,
doc
,
num_fewshot
,
provide_description
=
None
,
rnd
=
None
,
description
=
None
):
assert
num_fewshot
==
0
,
"TruthfulQA is intended only for the zero-shot setting."
assert
num_fewshot
==
0
,
"TruthfulQA is intended only for the zero-shot setting."
return
super
().
fewshot_context
(
return
super
().
fewshot_context
(
doc
=
doc
,
doc
=
doc
,
num_fewshot
=
num_fewshot
,
num_fewshot
=
num_fewshot
,
provide_description
=
provide_description
,
rnd
=
rnd
,
rnd
=
rnd
,
description
=
description
description
=
description
)
)
...
...
scripts/cost_estimate.py
View file @
57d0718a
...
@@ -54,7 +54,6 @@ def main():
...
@@ -54,7 +54,6 @@ def main():
evaluator
.
evaluate
(
evaluator
.
evaluate
(
lm
=
lm
,
lm
=
lm
,
task_dict
=
{
taskname
:
tasks
.
get_task
(
taskname
)()},
task_dict
=
{
taskname
:
tasks
.
get_task
(
taskname
)()},
provide_description
=
False
,
num_fewshot
=
0
,
num_fewshot
=
0
,
limit
=
None
,
limit
=
None
,
bootstrap_iters
=
10
,
bootstrap_iters
=
10
,
...
...
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