Commit c87703f3 authored by lintangsutawika's avatar lintangsutawika
Browse files

update

parent d1f50270
...@@ -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\nHypothesis: {{question}}\nConclusion:" doc_to_text: "{{text}}\n\nQuestion: {{question}}\nAnswer:"
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"
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\nHypothesis: {{question}}\nConclusion:"
doc_to_target: "{{outputs[0]}}"
doc_to_choice: ["yes", "no"]
should_decontaminate: true
doc_to_decontamination_query: input
metric_list:
- metric: f1
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):
......
...@@ -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:
......
...@@ -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"
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
...@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment