File size: 328 Bytes
7ed5f43
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
from datasets import load_dataset
from pathlib import Path

def test_dataset_loads():
    repo = Path(__file__).parent.parent
    name = str(repo.resolve())  # "danish-foundation-models/danish-gigaword-2"
    ds = load_dataset(name, split="train", streaming=True)
    sample = next(iter(ds))
    assert isinstance(sample, dict)