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
171f2924
Commit
171f2924
authored
Oct 24, 2020
by
Anish Thite
Browse files
add no target for triviaqa
parent
c9f3b113
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
lm_eval/tasks/triviaqa.py
lm_eval/tasks/triviaqa.py
+4
-2
No files found.
lm_eval/tasks/triviaqa.py
View file @
171f2924
...
@@ -38,8 +38,10 @@ class TriviaQA(Dataset):
...
@@ -38,8 +38,10 @@ class TriviaQA(Dataset):
pass
pass
def
doc_to_text
(
self
,
doc
,
include_target
=
True
):
def
doc_to_text
(
self
,
doc
,
include_target
=
True
):
return
''
.
join
([
'Q: '
,
doc
[
'Question'
],
'
\n\n
'
,
'A: '
,
doc
[
'Answer'
][
'Aliases'
][
0
]])
if
include_target
:
return
''
.
join
([
'Q: '
,
doc
[
'Question'
],
'
\n\n
'
,
'A: '
,
doc
[
'Answer'
][
'Aliases'
][
0
]])
else
:
return
''
.
join
([
'Q: '
,
doc
[
'Question'
],
'
\n\n
'
,
'A: '
])
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