diff --git a/docs/reference/beignet.io.md b/docs/reference/beignet.io.md index b9cb2f6c2b..05d69e0d1e 100644 --- a/docs/reference/beignet.io.md +++ b/docs/reference/beignet.io.md @@ -1,3 +1 @@ -# beignet.io - ::: beignet.io.ThreadSafeFile diff --git a/mkdocs.yml b/mkdocs.yml index 895def0eb7..be8702e653 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -67,7 +67,7 @@ nav: - "Transformations": "reference/features/geometry/transformations.md" - "beignet.func": - "Molecular dynamics": "reference/func/molecular-dynamics.md" - - "beignet.io": "reference/operators.io.md" + - "beignet.io": "reference/beignet.io.md" - "beignet.transforms": - "General-purpose": "reference/transforms/general-purpose.md" plugins: diff --git a/src/beignet/datasets/_astrazeneca_clearance_dataset.py b/src/beignet/datasets/_astrazeneca_clearance_dataset.py index 97b07b0d2a..0d4bd4511f 100644 --- a/src/beignet/datasets/_astrazeneca_clearance_dataset.py +++ b/src/beignet/datasets/_astrazeneca_clearance_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class AstraZenecaClearanceDataset(Dataset): +class AstraZenecaClearanceDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_astrazeneca_lipophilicity_dataset.py b/src/beignet/datasets/_astrazeneca_lipophilicity_dataset.py index 0586cfc9be..bc9f294d28 100644 --- a/src/beignet/datasets/_astrazeneca_lipophilicity_dataset.py +++ b/src/beignet/datasets/_astrazeneca_lipophilicity_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class AstraZenecaLipophilicityDataset(Dataset): +class AstraZenecaLipophilicityDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_astrazeneca_plasma_protein_binding_rate_dataset.py b/src/beignet/datasets/_astrazeneca_plasma_protein_binding_rate_dataset.py index cac551f2ac..9cce9e12bb 100644 --- a/src/beignet/datasets/_astrazeneca_plasma_protein_binding_rate_dataset.py +++ b/src/beignet/datasets/_astrazeneca_plasma_protein_binding_rate_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class AstraZenecaPlasmaProteinBindingRateDataset(Dataset): +class AstraZenecaPlasmaProteinBindingRateDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_bindingdb_dataset.py b/src/beignet/datasets/_bindingdb_dataset.py index c7b31203b5..9fa04051b9 100644 --- a/src/beignet/datasets/_bindingdb_dataset.py +++ b/src/beignet/datasets/_bindingdb_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class BindingDBDataset(Dataset): +class BindingDBDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_broccatelli_p_glycoprotein_inhibition_dataset.py b/src/beignet/datasets/_broccatelli_p_glycoprotein_inhibition_dataset.py index fc94eac34b..71794efd4d 100644 --- a/src/beignet/datasets/_broccatelli_p_glycoprotein_inhibition_dataset.py +++ b/src/beignet/datasets/_broccatelli_p_glycoprotein_inhibition_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class BroccatelliPGlycoproteinInhibitionDataset(Dataset): +class BroccatelliPGlycoproteinInhibitionDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_carbon_mangels_cytochrome_p450_2c9_substrate_dataset.py b/src/beignet/datasets/_carbon_mangels_cytochrome_p450_2c9_substrate_dataset.py index d172af4061..603bd49009 100644 --- a/src/beignet/datasets/_carbon_mangels_cytochrome_p450_2c9_substrate_dataset.py +++ b/src/beignet/datasets/_carbon_mangels_cytochrome_p450_2c9_substrate_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class CarbonMangelsCytochromeP4502C9SubstrateDataset(Dataset): +class CarbonMangelsCytochromeP4502C9SubstrateDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_carbon_mangels_cytochrome_p450_2d6_substrate_dataset.py b/src/beignet/datasets/_carbon_mangels_cytochrome_p450_2d6_substrate_dataset.py index 3d8bd8f105..c8d63b3616 100644 --- a/src/beignet/datasets/_carbon_mangels_cytochrome_p450_2d6_substrate_dataset.py +++ b/src/beignet/datasets/_carbon_mangels_cytochrome_p450_2d6_substrate_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class CarbonMangelsCytochromeP4502D6SubstrateDataset(Dataset): +class CarbonMangelsCytochromeP4502D6SubstrateDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_carbon_mangels_cytochrome_p450_3a4_substrate_dataset.py b/src/beignet/datasets/_carbon_mangels_cytochrome_p450_3a4_substrate_dataset.py index 5c64aa7a5f..55c3e79d9d 100644 --- a/src/beignet/datasets/_carbon_mangels_cytochrome_p450_3a4_substrate_dataset.py +++ b/src/beignet/datasets/_carbon_mangels_cytochrome_p450_3a4_substrate_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class CarbonMangelsCytochromeP4503A4SubstrateDataset(Dataset): +class CarbonMangelsCytochromeP4503A4SubstrateDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_clintox_dataset.py b/src/beignet/datasets/_clintox_dataset.py index 2a784af4dd..cef744d45b 100644 --- a/src/beignet/datasets/_clintox_dataset.py +++ b/src/beignet/datasets/_clintox_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class ClinToxDataset(Dataset): +class ClinToxDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_davis_dataset.py b/src/beignet/datasets/_davis_dataset.py index 8e0297559d..403b79d8c8 100644 --- a/src/beignet/datasets/_davis_dataset.py +++ b/src/beignet/datasets/_davis_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class DAVISDataset(Dataset): +class DAVISDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_drugcomb_dataset.py b/src/beignet/datasets/_drugcomb_dataset.py index 884c2ef59a..bed72e651f 100644 --- a/src/beignet/datasets/_drugcomb_dataset.py +++ b/src/beignet/datasets/_drugcomb_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class DrugCombDataset(Dataset): +class DrugCombDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_freesolv_dataset.py b/src/beignet/datasets/_freesolv_dataset.py index aba122ee75..5aae335ea6 100644 --- a/src/beignet/datasets/_freesolv_dataset.py +++ b/src/beignet/datasets/_freesolv_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class FreeSolvDataset(Dataset): +class FreeSolvDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_hou_human_intestinal_absorption_dataset.py b/src/beignet/datasets/_hou_human_intestinal_absorption_dataset.py index 132d6e7e25..d717ef76da 100644 --- a/src/beignet/datasets/_hou_human_intestinal_absorption_dataset.py +++ b/src/beignet/datasets/_hou_human_intestinal_absorption_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class HouHumanIntestinalAbsorptionDataset(Dataset): +class HouHumanIntestinalAbsorptionDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_kiba_dataset.py b/src/beignet/datasets/_kiba_dataset.py index 119dc0b40f..0fd8260bab 100644 --- a/src/beignet/datasets/_kiba_dataset.py +++ b/src/beignet/datasets/_kiba_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class KIBADataset(Dataset): +class KIBADataset(TDCDataset): def __init__( self, root: str | Path, diff --git a/src/beignet/datasets/_lombardo_volume_of_distribution_at_steady_state_dataset.py b/src/beignet/datasets/_lombardo_volume_of_distribution_at_steady_state_dataset.py index fec39ca590..5ac582f7ed 100644 --- a/src/beignet/datasets/_lombardo_volume_of_distribution_at_steady_state_dataset.py +++ b/src/beignet/datasets/_lombardo_volume_of_distribution_at_steady_state_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class LombardoVolumeOfDistributionAtSteadyStateDataset(Dataset): +class LombardoVolumeOfDistributionAtSteadyStateDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_ma_bioavailability_dataset.py b/src/beignet/datasets/_ma_bioavailability_dataset.py index 7ae6776646..05ceed4b6e 100644 --- a/src/beignet/datasets/_ma_bioavailability_dataset.py +++ b/src/beignet/datasets/_ma_bioavailability_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class MaBioavailabilityDataset(Dataset): +class MaBioavailabilityDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_martins_blood_brain_barrier_dataset.py b/src/beignet/datasets/_martins_blood_brain_barrier_dataset.py index 49e61ba383..656903929c 100644 --- a/src/beignet/datasets/_martins_blood_brain_barrier_dataset.py +++ b/src/beignet/datasets/_martins_blood_brain_barrier_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class MartinsBloodBrainBarrierDataset(Dataset): +class MartinsBloodBrainBarrierDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_obach_half_life_dataset.py b/src/beignet/datasets/_obach_half_life_dataset.py index 4708e5a055..850c5653d7 100644 --- a/src/beignet/datasets/_obach_half_life_dataset.py +++ b/src/beignet/datasets/_obach_half_life_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class ObachHalfLifeDataset(Dataset): +class ObachHalfLifeDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_pdbbind_dataset.py b/src/beignet/datasets/_pdbbind_dataset.py index cd4deb9614..9791dad9d2 100644 --- a/src/beignet/datasets/_pdbbind_dataset.py +++ b/src/beignet/datasets/_pdbbind_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class PDBbindDataset(Dataset): +class PDBbindDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_qm7_dataset.py b/src/beignet/datasets/_qm7_dataset.py index 8f87a14e86..6bee3b8a97 100644 --- a/src/beignet/datasets/_qm7_dataset.py +++ b/src/beignet/datasets/_qm7_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class QM7Dataset(Dataset): +class QM7Dataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_qm7b_dataset.py b/src/beignet/datasets/_qm7b_dataset.py index 196bc101d8..81ecc48837 100644 --- a/src/beignet/datasets/_qm7b_dataset.py +++ b/src/beignet/datasets/_qm7b_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class QM7bDataset(Dataset): +class QM7bDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_qm8_dataset.py b/src/beignet/datasets/_qm8_dataset.py index 64f171c740..9ac74191c9 100644 --- a/src/beignet/datasets/_qm8_dataset.py +++ b/src/beignet/datasets/_qm8_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class QM8Dataset(Dataset): +class QM8Dataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_qm9_dataset.py b/src/beignet/datasets/_qm9_dataset.py index cc4ffc8b11..0734ffb376 100644 --- a/src/beignet/datasets/_qm9_dataset.py +++ b/src/beignet/datasets/_qm9_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class QM9Dataset(Dataset): +class QM9Dataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_real_database_dataset.py b/src/beignet/datasets/_real_database_dataset.py index 5beda1b66b..9dbfcae4c6 100644 --- a/src/beignet/datasets/_real_database_dataset.py +++ b/src/beignet/datasets/_real_database_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class REALDatabaseDataset(Dataset): +class REALDatabaseDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_tox21_dataset.py b/src/beignet/datasets/_tox21_dataset.py index fd62c0200c..3c60d55ac1 100644 --- a/src/beignet/datasets/_tox21_dataset.py +++ b/src/beignet/datasets/_tox21_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path -from typing import Any, Callable - -from torch.utils.data import Dataset +from typing import Callable from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class Tox21Dataset(Dataset): +class Tox21Dataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - super().__init__() - - def __getitem__(self, index: int) -> Any: - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_toxcast_dataset.py b/src/beignet/datasets/_toxcast_dataset.py index 698fbd981a..77d7703a1a 100644 --- a/src/beignet/datasets/_toxcast_dataset.py +++ b/src/beignet/datasets/_toxcast_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class ToxCastDataset(Dataset): +class ToxCastDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - super().__init__() - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_uspto_reaction_product_dataset.py b/src/beignet/datasets/_uspto_reaction_product_dataset.py index 2fb2799143..2c04e442ee 100644 --- a/src/beignet/datasets/_uspto_reaction_product_dataset.py +++ b/src/beignet/datasets/_uspto_reaction_product_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class USPTOReactionProductDataset(Dataset): +class USPTOReactionProductDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_wang_effective_permeability_dataset.py b/src/beignet/datasets/_wang_effective_permeability_dataset.py index 1fb264f87c..1fcfb30e60 100644 --- a/src/beignet/datasets/_wang_effective_permeability_dataset.py +++ b/src/beignet/datasets/_wang_effective_permeability_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class WangEffectivePermeabilityDataset(Dataset): +class WangEffectivePermeabilityDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_zhu_acute_toxicity_ld50_dataset.py b/src/beignet/datasets/_zhu_acute_toxicity_ld50_dataset.py index 5174b3d3b0..fe1f090399 100644 --- a/src/beignet/datasets/_zhu_acute_toxicity_ld50_dataset.py +++ b/src/beignet/datasets/_zhu_acute_toxicity_ld50_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class ZhuAcuteToxicityLD50Dataset(Dataset): +class ZhuAcuteToxicityLD50Dataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + ) diff --git a/src/beignet/datasets/_zinc_dataset.py b/src/beignet/datasets/_zinc_dataset.py index 9163533df5..16b20bc745 100644 --- a/src/beignet/datasets/_zinc_dataset.py +++ b/src/beignet/datasets/_zinc_dataset.py @@ -1,12 +1,12 @@ from pathlib import Path from typing import Callable -from torch.utils.data import Dataset - from beignet.transforms import Transform +from ._tdc_dataset import TDCDataset + -class ZINCDataset(Dataset): +class ZINCDataset(TDCDataset): def __init__( self, root: str | Path, @@ -32,10 +32,14 @@ def __init__( target_transform : Callable | Transform | None Transforms the target. """ - raise NotImplementedError - - def __getitem__(self, index: int): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError + super().__init__( + root=root, + download=download, + identifier=0, + suffix="", + checksum="", + x_keys=[""], + y_keys=[""], + transform=transform, + target_transform=target_transform, + )