Unverified Commit 7f2a9cbd authored by Hailey Schoelkopf's avatar Hailey Schoelkopf Committed by GitHub
Browse files

Merge pull request #852 from EleutherAI/bigbench

[Refactor] bigbench
parents c4fa6fb5 51a43a76
# Generated by utils.py
dataset_name: symbol_interpretation_zero_shot
include: ../multiple_choice_template_yaml
task: bigbench_symbol_interpretation_multiple_choice
# Generated by utils.py
dataset_name: temporal_sequences_zero_shot
include: ../multiple_choice_template_yaml
task: bigbench_temporal_sequences_multiple_choice
# Generated by utils.py
dataset_name: tense_zero_shot
include: ../multiple_choice_template_yaml
task: bigbench_tense_multiple_choice
# Generated by utils.py
dataset_name: timedial_zero_shot
include: ../multiple_choice_template_yaml
task: bigbench_timedial_multiple_choice
# Generated by utils.py
dataset_name: topical_chat_zero_shot
include: ../multiple_choice_template_yaml
task: bigbench_topical_chat_multiple_choice
# Generated by utils.py
dataset_name: tracking_shuffled_objects_zero_shot
include: ../multiple_choice_template_yaml
task: bigbench_tracking_shuffled_objects_multiple_choice
# Generated by utils.py
dataset_name: understanding_fables_zero_shot
include: ../multiple_choice_template_yaml
task: bigbench_understanding_fables_multiple_choice
# Generated by utils.py
dataset_name: undo_permutation_zero_shot
include: ../multiple_choice_template_yaml
task: bigbench_undo_permutation_multiple_choice
# Generated by utils.py
dataset_name: unit_conversion_zero_shot
include: ../multiple_choice_template_yaml
task: bigbench_unit_conversion_multiple_choice
# Generated by utils.py
dataset_name: unit_interpretation_zero_shot
include: ../multiple_choice_template_yaml
task: bigbench_unit_interpretation_multiple_choice
# Generated by utils.py
dataset_name: unnatural_in_context_learning_zero_shot
include: ../multiple_choice_template_yaml
task: bigbench_unnatural_in_context_learning_multiple_choice
# Generated by utils.py
dataset_name: vitaminc_fact_verification_zero_shot
include: ../multiple_choice_template_yaml
task: bigbench_vitaminc_fact_verification_multiple_choice
# Generated by utils.py
dataset_name: what_is_the_tao_zero_shot
include: ../multiple_choice_template_yaml
task: bigbench_what_is_the_tao_multiple_choice
# Generated by utils.py
dataset_name: which_wiki_edit_zero_shot
include: ../multiple_choice_template_yaml
task: bigbench_which_wiki_edit_multiple_choice
# Generated by utils.py
dataset_name: winowhy_zero_shot
include: ../multiple_choice_template_yaml
task: bigbench_winowhy_multiple_choice
# Generated by utils.py
dataset_name: word_sorting_zero_shot
include: ../multiple_choice_template_yaml
task: bigbench_word_sorting_multiple_choice
# Generated by utils.py
dataset_name: word_unscrambling_zero_shot
include: ../multiple_choice_template_yaml
task: bigbench_word_unscrambling_multiple_choice
group: bigbench
dataset_path: bigbench # will switch to `hails/bigbench` when all tasks are pushed
dataset_kwargs:
# num_shots: 0 # TODO: num of shots for `bigbench` HF dataset should be controlled through this, not through the typical methods
# subtask_name: null
output_type: multiple_choice
test_split: default
doc_to_text: inputs
doc_to_target: "{{multiple_choice_targets.index(targets[0])}}"
doc_to_choice: "{{multiple_choice_targets}}"
metric_list:
- metric: acc
# TODO: brier score and other metrics
"""
A utility script that pushes all Bigbench subtasks from their form in the `bigbench` HF dataset
into `{org name}/bigbench`.
Prior to running, log into HF Hub for the target HF hub org via `huggingface-cli login`.
Requires the installation of
`pip install "bigbench @ https://storage.googleapis.com/public_research_data/bigbench/bigbench-0.0.1.tar.gz"`
and is included so that the bigbench dependency can be avoided.
"""
from tqdm import tqdm
import datasets
import bigbench.api.util as bb_utils
all_task_names = bb_utils.get_all_json_task_names()
num_shots = [0]
for shots in num_shots:
for task_name in tqdm(all_task_names):
try:
print(f"Loading '{task_name}' with num_shots={shots}...")
task_ds = datasets.load_dataset("bigbench", name=task_name, num_shots=shots)
print(f"Pushing '{task_name}' with num_shots={shots}...")
task_ds.push_to_hub("hails/bigbench", task_name + "_zero_shot")
del task_ds
except Exception as e:
raise e
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