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
c87703f3
Commit
c87703f3
authored
Sep 11, 2023
by
lintangsutawika
Browse files
update
parent
d1f50270
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
26 deletions
+21
-26
lm_eval/tasks/scrolls/narrativeqa/default.yaml
lm_eval/tasks/scrolls/narrativeqa/default.yaml
+4
-3
lm_eval/tasks/scrolls/qasper/default.yaml
lm_eval/tasks/scrolls/qasper/default.yaml
+0
-15
lm_eval/tasks/scrolls/quality/utils.py
lm_eval/tasks/scrolls/quality/utils.py
+3
-1
lm_eval/tasks/scrolls/scroll_multiplechoice_task_yaml
lm_eval/tasks/scrolls/scroll_multiplechoice_task_yaml
+1
-1
lm_eval/tasks/scrolls/scroll_summary_task_yaml
lm_eval/tasks/scrolls/scroll_summary_task_yaml
+11
-3
lm_eval/tasks/scrolls/summscreenfd/default.yaml
lm_eval/tasks/scrolls/summscreenfd/default.yaml
+1
-1
lm_eval/utils.py
lm_eval/utils.py
+1
-2
No files found.
lm_eval/tasks/scrolls/narrativeqa/default.yaml
View file @
c87703f3
...
@@ -3,13 +3,14 @@ task: scrolls_narrativeqa
...
@@ -3,13 +3,14 @@ task: scrolls_narrativeqa
dataset_name
:
narrative_qa
dataset_name
:
narrative_qa
output_type
:
greedy_until
output_type
:
greedy_until
process_docs
:
!function
../preprocessors.process_docs_prepended_question
process_docs
:
!function
../preprocessors.process_docs_prepended_question
doc_to_text
:
"
{{text}}
\n\n
Hypothesis:
{{question}}
\n
Conclusion:"
doc_to_text
:
"
{{text}}
\n\n
Question:
{{question}}
\n
Answer:"
doc_to_target
:
"
{{outputs[0]}}"
doc_to_target
:
"
{{outputs|
join(',
')}}"
doc_to_choice
:
[
"
Not
mentioned"
,
"
Entailment"
,
"
Contradiction"
]
should_decontaminate
:
true
should_decontaminate
:
true
doc_to_decontamination_query
:
input
doc_to_decontamination_query
:
input
metric_list
:
metric_list
:
-
metric
:
f1
-
metric
:
f1
aggregation
:
!function
../metrics.agg_f1
higher_is_better
:
true
generation_kwargs
:
generation_kwargs
:
until
:
until
:
-
"
\n
"
-
"
\n
"
lm_eval/tasks/scrolls/qasper/default.yaml
deleted
100644 → 0
View file @
d1f50270
group
:
scrolls
task
:
scrolls_qasper
dataset_path
:
tau/scrolls
dataset_name
:
qasper
output_type
:
multiple_choice
training_split
:
train
validation_split
:
validation
process_docs
:
!function
../preprocessors.process_docs_prepended_question
doc_to_text
:
"
{{text}}
\n\n
Hypothesis:
{{question}}
\n
Conclusion:"
doc_to_target
:
"
{{outputs[0]}}"
doc_to_choice
:
[
"
yes"
,
"
no"
]
should_decontaminate
:
true
doc_to_decontamination_query
:
input
metric_list
:
-
metric
:
f1
lm_eval/tasks/scrolls/quality/utils.py
View file @
c87703f3
import
re
import
re
from
functools
import
partial
from
functools
import
partial
from
..preprocessors
import
process_docs_prepended_question
import
sys
sys
.
path
.
append
(
'..'
)
from
preprocessors
import
process_docs_prepended_question
def
process_docs
(
dataset
):
def
process_docs
(
dataset
):
...
...
lm_eval/tasks/scrolls/scroll_multiplechoice_task_yaml
View file @
c87703f3
...
@@ -3,7 +3,7 @@ dataset_path: tau/scrolls
...
@@ -3,7 +3,7 @@ dataset_path: tau/scrolls
output_type: multiple_choice
output_type: multiple_choice
training_split: train
training_split: train
validation_split: validation
validation_split: validation
process_docs: !function
../
preprocessors.process_docs
process_docs: !function preprocessors.process_docs
should_decontaminate: true
should_decontaminate: true
doc_to_decontamination_query: input
doc_to_decontamination_query: input
metric_list:
metric_list:
...
...
lm_eval/tasks/scrolls/scroll_summary_task_yaml
View file @
c87703f3
...
@@ -3,13 +3,21 @@ dataset_path: tau/scrolls
...
@@ -3,13 +3,21 @@ dataset_path: tau/scrolls
output_type: greedy_until
output_type: greedy_until
training_split: train
training_split: train
validation_split: validation
validation_split: validation
process_docs: !function
../
preprocessors.process_docs
process_docs: !function preprocessors.process_docs
doc_to_text: "{{input}}\n\nQuestion: What is a summary of the preceding text?\nAnswer:"
doc_to_text: "{{input}}\n\nQuestion: What is a summary of the preceding text?\nAnswer:"
doc_to_target: "{{outputs
.
join(
"
,
"
)}}"
doc_to_target: "{{outputs
|
join(
'
,
'
)}}"
should_decontaminate: true
should_decontaminate: true
doc_to_decontamination_query: input
doc_to_decontamination_query: input
metric_list:
metric_list:
- metric: f1
- metric: !function metrics.rouge1
aggregation: mean
higher_is_better: true
- metric: !function metrics.rouge2
aggregation: mean
higher_is_better: true
- metric: !function metrics.rougeL
aggregation: mean
higher_is_better: true
generation_kwargs:
generation_kwargs:
until:
until:
- "\n"
- "\n"
lm_eval/tasks/scrolls/summscreenfd/default.yaml
View file @
c87703f3
include
:
../scroll_summary_task_yaml
include
:
../scroll_summary_task_yaml
task
:
scrolls_
govreport
task
:
scrolls_
summscreenfd
dataset_path
:
tau/scrolls
dataset_path
:
tau/scrolls
dataset_name
:
summ_screen_fd
dataset_name
:
summ_screen_fd
lm_eval/utils.py
View file @
c87703f3
...
@@ -432,8 +432,7 @@ def load_yaml_config(yaml_path):
...
@@ -432,8 +432,7 @@ def load_yaml_config(yaml_path):
# If not found, assume the included yaml
# If not found, assume the included yaml
# is in the same dir as the original yaml
# is in the same dir as the original yaml
if
not
os
.
path
.
isfile
(
path
):
if
not
os
.
path
.
isfile
(
path
):
path
=
os
.
path
.
join
(
yaml_dir
,
path
)
path
=
os
.
path
.
normpath
(
os
.
path
.
join
(
yaml_dir
,
path
))
try
:
try
:
included_yaml_config
=
load_yaml_config
(
path
)
included_yaml_config
=
load_yaml_config
(
path
)
final_yaml_config
.
update
(
included_yaml_config
)
final_yaml_config
.
update
(
included_yaml_config
)
...
...
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