Skip to content

Commit

Permalink
datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
0x00b1 committed Jul 17, 2024
1 parent b04f642 commit dfc6fca
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 0 deletions.
Empty file.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ nav:
- "Protein":
- "Protein sequence": "reference/datasets/generation/protein/protein-sequence.md"
- "Protein structure": "reference/datasets/generation/protein/protein-structure.md"
- "Reaction": "reference/datasets/generation/reaction.md"
- "Retrosynthesis": "reference/datasets/generation/retrosynthesis.md"
- "Prediction":
- "Antibody affinity": "reference/datasets/prediction/antibody-affinity.md"
Expand Down
2 changes: 2 additions & 0 deletions src/beignet/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
from ._uniref50_dataset import UniRef50Dataset
from ._uniref90_dataset import UniRef90Dataset
from ._uniref100_dataset import UniRef100Dataset
from ._uspto_dataset import USPTODataset
from ._uspto_reaction_product_dataset import USPTOReactionProductDataset
from ._veith_cytochrome_p450_1a2_inhibition_dataset import (
VeithCytochromeP4501A2InhibitionDataset,
Expand Down Expand Up @@ -163,6 +164,7 @@
"ToxCastDataset",
"TrEMBLDataset",
"TrajectoryDataset",
"USPTODataset",
"USPTOReactionProductDataset",
"UniProtDataset",
"UniRef100Dataset",
Expand Down
44 changes: 44 additions & 0 deletions src/beignet/datasets/_uspto_dataset.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
from pathlib import Path
from typing import Callable

from beignet.transforms import Transform

from ._tdc_dataset import TDCDataset


class USPTODataset(TDCDataset):
def __init__(
self,
root: str | Path,
*,
download: bool = False,
transform: Callable | Transform | None = None,
target_transform: Callable | Transform | None = None,
):
r"""
Parameters
----------
root : str | Path
Root directory of dataset.
download: bool
If `True`, downloads the dataset to the root directory. If dataset
already exists, it is not redownloaded. Default, `False`.
transform : Callable | Transform | None
Transforms the input.
target_transform : Callable | Transform | None
Transforms the target.
"""
super().__init__(
root=root,
download=download,
identifier=0,
suffix="",
checksum="",
x_keys=[""],
y_keys=[""],
transform=transform,
target_transform=target_transform,
)

0 comments on commit dfc6fca

Please sign in to comment.