streaming

This commit is contained in:
mkozlowskiAzimuthe 2023-01-25 17:59:38 +01:00
parent 679048f88a
commit cb3c3e46cb

View File

@ -47,7 +47,7 @@ class DonutDataset(Dataset):
self.sort_json_key = sort_json_key
self.added_tokens = added_tokens
self.dataset = load_dataset(dataset_name_or_path, split=self.split, stream=True).with_format("torch")
self.dataset = load_dataset(dataset_name_or_path, split=self.split, streaming=True).with_format("torch")
self.dataset_length = len(self.dataset)
self.gt_token_sequences = []