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
c9f3b113
Commit
c9f3b113
authored
Oct 24, 2020
by
Anish Thite
Browse files
add no target for storycloze
parent
e3c2e692
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
lm_eval/tasks/storycloze.py
lm_eval/tasks/storycloze.py
+4
-1
No files found.
lm_eval/tasks/storycloze.py
View file @
c9f3b113
...
@@ -40,7 +40,10 @@ class StoryCloze(Dataset):
...
@@ -40,7 +40,10 @@ class StoryCloze(Dataset):
pass
pass
def
doc_to_text
(
self
,
doc
,
include_target
=
True
):
def
doc_to_text
(
self
,
doc
,
include_target
=
True
):
return
' '
.
join
([
*
doc
[
1
:
5
],
doc
[
int
(
doc
[
-
1
])
-
4
]])
if
include_target
:
return
' '
.
join
([
*
doc
[
1
:
5
],
doc
[
int
(
doc
[
-
1
])
-
4
]])
else
:
return
' '
.
join
([
*
doc
[
1
:
5
]])
def
evaluate
(
self
,
docs
,
lm
):
def
evaluate
(
self
,
docs
,
lm
):
pass
pass
...
...
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