from datasets import load_dataset from itertools import islice import sys import time from tqdm import tqdm for x in ["arxiv", "books", "formal", "stack-exchange", "wiki", "math-dataset"]: dataset = load_dataset("./proof-pile.py", x) print(x.upper()) print(dataset) then = time.time() for x in tqdm(dataset["train"]): pass now = time.time() print(f"DATASET TRAVERSED IN {now-then} SECONDS")