def tiny_ft_dataset_path(tmp_path: Path, dataset_size: int = 4) -> Path:
    """Creates a tiny dataset and returns the path."""
    tiny_dataset_path = tmp_path / 'test-ift-data-small'
    tiny_dataset_path.mkdir(exist_ok=True)
    tiny_dataset_file = tiny_dataset_path / 'train.jsonl'
    if dist.get_world_size() == 1 or dist.get_global_rank() == 0:
        make_tiny_ft_dataset(path=str(tiny_dataset_file), size=dataset_size)
    return tiny_dataset_path
Creates a tiny dataset and returns the path.
tests/fixtures/data.py