15 lines
No EOL
312 B
Python
15 lines
No EOL
312 B
Python
import json
|
|
|
|
from datasets import load_dataset
|
|
|
|
tests = []
|
|
|
|
ds = load_dataset("openai/gsm8k", "main")
|
|
|
|
with open("train.json", "w") as f:
|
|
f.write("[")
|
|
for test in ds["test"]:
|
|
json.dump(test, f, indent=2)
|
|
f.write(",\n")
|
|
f.write("]")
|
|
###Как агент умеет размышлять |