torchwrench.extras.hdf.dataset module¶
- class torchwrench.extras.hdf.dataset.HDFDataset(hdf_fpath: str | ~pathlib.Path, *, transform: ~typing.Callable[[__SPHINX_IMMATERIAL_TYPE_VAR__V_T], __SPHINX_IMMATERIAL_TYPE_VAR__V_U] | None = <function identity>, keep_padding: ~typing.Iterable[str] = (), return_added_columns: bool = False, open_hdf: bool = True, cast: ~typing.Literal['to_torch_or_builtin', 'to_torch_or_numpy', 'as_builtin', 'to_numpy_src', 'to_torch_src', 'none'] = 'none', file_kwds: ~typing.Dict[str, ~typing.Any] | None = None)[source]¶
Bases:
Generic[T,U],DatasetSlicer[U]- property attrs : HDFDatasetAttributes¶
-
close(ignore_if_closed: bool =
False, remove_file: bool =False) None[source]¶
- get_attrs() HDFDatasetAttributes[source]¶
- get_column_dtype(column_name: str) dtype[source]¶
-
get_item(index: int, column: None =
None) U[source]¶ - get_item(index: Iterable[int] | slice | None, column: str) list
-
get_item(index: Iterable[int] | slice | None, column: list[str] | None =
None) dict[str, list] -
get_item(index: Any, column: Any, raw: bool =
False) Any
- property item_type : 'dict' | 'tuple'¶
Return the global dataset info.
-
open(ignore_if_opened: bool =
False) None[source]¶