yhavinga commited on
Commit
5dac9d8
1 Parent(s): 35ab381

Update test

Browse files
Files changed (1) hide show
  1. 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("./cnn_dailymail_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["article"]) <= 11000
15
- assert 10 <= len(e["highlights"]) <= 500
16
  if i == 100:
17
  break
18
 
19
 
20
  def test_train_split():
21
- ds = load_dataset("./cnn_dailymail_dutch.py", split="train" + f"[:{2000}]")
22
  assert len(ds) == 2000
23
 
24
 
25
  def test_batch_dataset():
26
- datasets = load_dataset("./cnn_dailymail_dutch.py")
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"}