Datasets:
from pathlib import Path | |
from typing import cast | |
import pytest | |
from datasets import Dataset, load_dataset | |
from .conftest import DATASET_NAMES | |
# TODO: fix this | |
def test_no_within_data_duplicates(repo_path: Path, dataset_name: str): | |
ds = load_dataset(str(repo_path.resolve()), dataset_name, split="train") | |
ds = cast(Dataset, ds) | |
assert len(set(ds["text"])) == len(ds) | |
# TODO: fix this | |
def test_no_data_duplicates(repo_path: Path): | |
ds = load_dataset(str(repo_path.resolve()), split="train") | |
ds = cast(Dataset, ds) | |
assert len(set(ds["text"])) == len(ds) | |