stsb / create_dataset.py
luketheduke's picture
Upload create_dataset.py
6028d44
raw
history blame
478 Bytes
from datasets import load_dataset
def main():
raw_dset = load_dataset("glue", "stsb")
raw_dset = raw_dset.rename_column("sentence1", "text1")
raw_dset = raw_dset.rename_column("sentence2", "text2")
for split, dset in raw_dset.items():
label_text = ["NA"] * len(dset)
dset = dset.add_column("label_text", label_text)
dset.to_json(f"{split}.jsonl")
if __name__ == "__main__":
main()
print("Job's done!")