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
d42af30d
Unverified
Commit
d42af30d
authored
Mar 25, 2021
by
Leo Gao
Committed by
GitHub
Mar 25, 2021
Browse files
wsc273: change random
parent
dc1a17b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
lm_eval/tasks/wsc273.py
lm_eval/tasks/wsc273.py
+3
-1
No files found.
lm_eval/tasks/wsc273.py
View file @
d42af30d
...
...
@@ -59,7 +59,9 @@ class WinogradSchemaChallenge273(HFTask):
def
fewshot_examples
(
self
,
k
):
# NOTE: `super().fewshot_examples` samples from training docs which are
# not available for this test-set-only dataset.
return
random
.
sample
(
list
(
self
.
test_docs
()),
k
)
rnd
=
random
.
Random
()
rnd
.
seed
(
42
)
return
rnd
.
sample
(
list
(
self
.
test_docs
()),
k
)
def
doc_to_text
(
self
,
doc
):
return
self
.
partial_context
(
doc
,
doc
[
"options"
][
doc
[
"label"
]])
...
...
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