torchwrench.utils.data.dataset package¶
-
class torchwrench.utils.data.dataset.DatasetSlicer(*, add_slice_support: bool =
True, add_indices_support: bool =True, add_mask_support: bool =True, add_none_support: bool =True)[source]¶
-
class torchwrench.utils.data.dataset.DatasetSlicerWrapper(dataset: SupportsGetitemLen[T, Any], *, add_slice_support: bool =
True, add_indices_support: bool =True, add_mask_support: bool =True, add_none_support: bool =True)[source]¶ Bases:
Generic[T],DatasetSlicer[T],Wrapper[T]
- class torchwrench.utils.data.dataset.EmptyDataset[source]¶
-
Dataset placeholder. Raises StopIteration if __getitem__ is called.
- class torchwrench.utils.data.dataset.IterableSubset(dataset: SupportsGetitemLen[T, Any] | SupportsIterLen[T], indices: Iterable[int] | LongTensor1D)[source]¶
Bases:
IterableWrapper[T],Generic[T]
-
class torchwrench.utils.data.dataset.IterableTransformWrapper(dataset: SupportsGetitemLen[T, Any] | SupportsIterLen[T], transform: Callable[[T], U] | None, condition: Callable[[T, int], bool] | None =
None)[source]¶ Bases:
IterableWrapper[T],Generic[T,U]
- class torchwrench.utils.data.dataset.IterableWrapper(dataset: SupportsGetitemLen[T, Any] | SupportsIterLen[T])[source]¶
Bases:
Generic[T],IterableDataset[T],_WrapperBase[T]
- class torchwrench.utils.data.dataset.Subset(dataset: SupportsGetitemLen[T, Any], indices: Iterable[int])[source]¶
-
class torchwrench.utils.data.dataset.TabularDataset(data: Mapping[Any, SupportsGetitemIterLen] | SupportsGetitemIterLen[dict[Any, Any], Any] | DataFrame | Tensor | ndarray | DynamicItemDataset | TabularDatasetInterface[T_RowIndex, T_ColIndex], row_mapper: Mapping[T_RowIndex, T_RowIndex] | None =
None, col_mapper: MutableMapping[T_ColIndex, T_ColIndex] | None =None, fns_list: Iterable[tuple[tuple[T_ColIndex, ...] | T_ColIndex, tuple[T_ColIndex, ...] | T_ColIndex, Callable]] =())[source]¶ Bases:
Generic[T_RowIndex,T_ColIndex],TabularDatasetInterface[T_RowIndex,T_ColIndex]-
add_dynamic_column(fn: Callable, requires: tuple[T_ColIndex, ...], provides: T_ColIndex | tuple[T_ColIndex, ...], add_to_output_keys: bool =
True) None[source]¶
- property column_names : SupportsGetitemIterLen¶
- property row_names : SupportsGetitemIterLen¶
-
add_dynamic_column(fn: Callable, requires: tuple[T_ColIndex, ...], provides: T_ColIndex | tuple[T_ColIndex, ...], add_to_output_keys: bool =
-
class torchwrench.utils.data.dataset.TransformWrapper(dataset: SupportsGetitemLen[T, Any], transform: Callable[[T], U] | None, condition: Callable[[T, int], bool] | None =
None)[source]¶
- class torchwrench.utils.data.dataset.Wrapper(dataset: Any)[source]¶
Bases:
Generic[T],_WrapperBase[T]
Submodules¶
- torchwrench.utils.data.dataset.slicer module
- torchwrench.utils.data.dataset.tabular module
- torchwrench.utils.data.dataset.wrapper module
- torchwrench.utils.data.dataset.wrapper.EmptyDataset
- torchwrench.utils.data.dataset.wrapper.IterableSubset
- torchwrench.utils.data.dataset.wrapper.IterableTransformWrapper
- torchwrench.utils.data.dataset.wrapper.IterableWrapper
- torchwrench.utils.data.dataset.wrapper.Subset
- torchwrench.utils.data.dataset.wrapper.TransformWrapper
- torchwrench.utils.data.dataset.wrapper.Wrapper