HuggingFaceDataset#
- class stable_ssl.data.HuggingFaceDataset(*args: list, rename_columns: dict | None = None, remove_columns: dict | None = None, transform: dict | None = None, add_index: bool = False, **kwargs: dict)[source]#
Bases:
Dataset
Load a HuggingFace dataset.
- Parameters:
*args (list) – Additional arguments to pass to datasets.load_dataset.
rename_columns (dict) – A mapping of names from the HF dataset to what the dict should contain in this dataset. For example `{“x”:”image”, “y”:”label”}
remove_columns (list) – A mapping of names from the HF dataset to what the dict should contain in this dataset. For example `{“x”:”image”, “y”:”label”}
transform (dict[str: callable]) – Which key to transform
add_index (bool) – Whether to add a key “index” with the datum index
**kwargs (dict) – Additional keyword arguments to pass to datasets.load_dataset.