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
02a4def2
"Doc/vscode:/vscode.git/clone" did not exist on "7afec3102a0532bbe39c3352de0e4047a59a4ed9"
Commit
02a4def2
authored
Jan 08, 2022
by
Leo Gao
Browse files
Update blimp fewshot_context
parent
5792030c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
lm_eval/tasks/blimp.py
lm_eval/tasks/blimp.py
+11
-2
No files found.
lm_eval/tasks/blimp.py
View file @
02a4def2
...
...
@@ -29,9 +29,18 @@ class BlimpTask(HFTask):
self
.
data
[
"validation"
]
=
self
.
data
[
"train"
]
del
self
.
data
[
"train"
]
def
fewshot_context
(
self
,
doc
,
num_fewshot
,
provide_description
,
rnd
):
def
fewshot_context
(
self
,
doc
,
num_fewshot
,
provide_description
=
None
,
rnd
=
None
,
description
=
None
):
assert
num_fewshot
==
0
assert
not
provide_description
assert
rnd
is
not
None
,
"A `random.Random` generator argument must be provided to `rnd`"
assert
not
provide_description
,
(
"The `provide_description` arg will be removed in future versions. To prepend "
"a custom description to the context, supply the corresponding string via the "
"`description` arg."
)
if
provide_description
is
not
None
:
# nudge people to not specify it at all
print
(
"WARNING: provide_description is deprecated and will be removed in a future version in favor of description_dict"
)
return
""
def
doc_to_text
(
self
,
doc
):
...
...
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