Update test
Browse files- test_xsum_dutch.py +5 -5
test_xsum_dutch.py
CHANGED
@@ -5,23 +5,23 @@ from datasets import load_dataset
|
|
5 |
|
6 |
|
7 |
def test_streaming_dataset():
|
8 |
-
datasets = load_dataset("./
|
9 |
assert set(datasets.keys()) == {"train", "validation", "test"}
|
10 |
|
11 |
for split in ["train", "validation", "test"]:
|
12 |
ds = datasets[split]
|
13 |
for i, e in enumerate(ds):
|
14 |
-
assert 10 <= len(e["
|
15 |
-
assert 10 <= len(e["
|
16 |
if i == 100:
|
17 |
break
|
18 |
|
19 |
|
20 |
def test_train_split():
|
21 |
-
ds = load_dataset("./
|
22 |
assert len(ds) == 2000
|
23 |
|
24 |
|
25 |
def test_batch_dataset():
|
26 |
-
datasets = load_dataset("./
|
27 |
assert set(datasets.keys()) == {"train", "validation", "test"}
|
|
|
5 |
|
6 |
|
7 |
def test_streaming_dataset():
|
8 |
+
datasets = load_dataset("./xsum_dutch.py", streaming=True)
|
9 |
assert set(datasets.keys()) == {"train", "validation", "test"}
|
10 |
|
11 |
for split in ["train", "validation", "test"]:
|
12 |
ds = datasets[split]
|
13 |
for i, e in enumerate(ds):
|
14 |
+
assert 10 <= len(e["document"]) <= 11000
|
15 |
+
assert 10 <= len(e["summary"]) <= 500
|
16 |
if i == 100:
|
17 |
break
|
18 |
|
19 |
|
20 |
def test_train_split():
|
21 |
+
ds = load_dataset("./xsum_dutch.py", split="train" + f"[:{2000}]")
|
22 |
assert len(ds) == 2000
|
23 |
|
24 |
|
25 |
def test_batch_dataset():
|
26 |
+
datasets = load_dataset("./xsum_dutch.py")
|
27 |
assert set(datasets.keys()) == {"train", "validation", "test"}
|