core.datasets.base_dataset#
Copyright (c) Meta, Inc. and its affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.
Attributes#
Exceptions#
Inappropriate argument value (of correct type). |
Classes#
Base Dataset class for all OCP datasets. |
|
A pytorch subset that also takes metadata if given. |
Functions#
|
Create a dataset from a config dictionary |
Module Contents#
- core.datasets.base_dataset.T_co#
- class core.datasets.base_dataset.DatasetMetadata#
Bases:
NamedTuple
- natoms: numpy.typing.ArrayLike | None = None#
- exception core.datasets.base_dataset.UnsupportedDatasetError#
Bases:
ValueError
Inappropriate argument value (of correct type).
- class core.datasets.base_dataset.BaseDataset(config: dict)#
Bases:
torch.utils.data.Dataset
[T_co
]Base Dataset class for all OCP datasets.
- config#
- paths = []#
- lin_ref = None#
- __len__() int #
- metadata_hasattr(attr) bool #
- property indices#
- property _metadata: DatasetMetadata#
- get_metadata(attr, idx)#
- class core.datasets.base_dataset.Subset(dataset: BaseDataset, indices: collections.abc.Sequence[int], metadata: DatasetMetadata | None = None)#
Bases:
torch.utils.data.Subset
,BaseDataset
A pytorch subset that also takes metadata if given.
- metadata#
- indices#
- num_samples#
- config#
- property _metadata: DatasetMetadata#
- get_metadata(attr, idx)#