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
ab6883b1
Commit
ab6883b1
authored
Apr 11, 2022
by
jon-tow
Browse files
Fix decontamination queries
parent
9b4bfb6a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
lm_eval/tasks/translation.py
lm_eval/tasks/translation.py
+1
-1
lm_eval/tasks/triviaqa.py
lm_eval/tasks/triviaqa.py
+1
-1
No files found.
lm_eval/tasks/translation.py
View file @
ab6883b1
...
@@ -132,7 +132,7 @@ class GeneralTranslationTask(Task):
...
@@ -132,7 +132,7 @@ class GeneralTranslationTask(Task):
return
True
return
True
def
doc_to_decontamination_query
(
self
,
doc
):
def
doc_to_decontamination_query
(
self
,
doc
):
return
doc
[
"
ref"
]
+
" "
+
doc
[
"ref
"
]
return
doc
[
"
src
"
]
def
doc_to_target
(
self
,
doc
):
def
doc_to_target
(
self
,
doc
):
# This shows a single target, though there may be multiple targets in a lang test
# This shows a single target, though there may be multiple targets in a lang test
...
...
lm_eval/tasks/triviaqa.py
View file @
ab6883b1
...
@@ -58,7 +58,7 @@ class TriviaQA(Task):
...
@@ -58,7 +58,7 @@ class TriviaQA(Task):
return
True
return
True
def
doc_to_decontamination_query
(
self
,
doc
):
def
doc_to_decontamination_query
(
self
,
doc
):
return
doc
[
'
Question'
]
+
" "
+
doc
[
'SearchResults'
][
'Descrip
tion'
]
return
doc
[
'
ques
tion'
]
def
doc_to_target
(
self
,
doc
):
def
doc_to_target
(
self
,
doc
):
return
" "
+
doc
[
'answer'
][
'value'
]
return
" "
+
doc
[
'answer'
][
'value'
]
...
...
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