Unverified Commit 908ac2b2 authored by Baber Abbasi's avatar Baber Abbasi Committed by GitHub
Browse files

changed dataset to parquet version (#2845)

parent 1b357a68
......@@ -51,3 +51,6 @@ None.
- [ ] Variant with Calculator (see https://github.com/openai/grade-school-math/blob/master/grade_school_math/calculator.py for example implementation)
- [ ] Using Verifiers
- [ ] Majority voting "without CoT"
### Changelog
no version change: changed dataset to `SaylorTwift/bbh`. Do not expect any change in the results.
......@@ -11,8 +11,6 @@ import requests
import yaml
from tqdm import tqdm
from lm_eval import utils
def parse_args():
parser = argparse.ArgumentParser()
......@@ -51,9 +49,10 @@ if __name__ == "__main__":
for shot in few_shot:
try:
answer = answer_regex.search(shot)[0]
except Exception:
except Exception as e:
print("task", task)
print(shot)
raise e
example = shot.split("Let's think step by step.")[0]
prefix_doc_to_text += f"{example}{answer}\n\n"
......@@ -70,7 +69,7 @@ if __name__ == "__main__":
}
file_save_path = args.save_prefix_path + f"/{task}.yaml"
utils.eval_logger.info(f"Saving yaml for subset {task} to {file_save_path}")
print(f"Saving yaml for subset {task} to {file_save_path}")
with open(file_save_path, "w", encoding="utf-8") as yaml_file:
yaml.dump(
yaml_dict,
......
dataset_path: lukaemon/bbh
dataset_path: SaylorTwift/bbh
output_type: generate_until
test_split: test
doc_to_target: "{{target}}"
......
dataset_path: lukaemon/bbh
dataset_path: SaylorTwift/bbh
output_type: generate_until
test_split: test
doc_to_target: "{{target}}"
......
dataset_path: lukaemon/bbh
dataset_path: SaylorTwift/bbh
output_type: generate_until
test_split: test
doc_to_target: "{{target}}"
......
dataset_path: lukaemon/bbh
dataset_path: SaylorTwift/bbh
output_type: generate_until
test_split: test
doc_to_target: "{{target}}"
......
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