Skip to content

Commit eac426d

Browse files
committed
modified the doc-string in TransformSubset in base_dataset.py
1 parent edbbb29 commit eac426d

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

autoPyTorch/datasets/base_dataset.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,20 @@ def type_check(train_tensors: BaseDatasetType, val_tensors: Optional[BaseDataset
4343

4444

4545
class TransformSubset(Subset):
46-
"""
47-
I did not understand the meaning of this doc-string.
48-
Because the BaseDataset contains all the data (train/val/test), the transformations
49-
have to be applied with some directions. That is, if yielding train data,
50-
we expect to apply train transformation (which have augmentations exclusively).
46+
"""Wrapper of BaseDataset for splitted datasets
47+
48+
Since the BaseDataset contains all the data points (train/val/test),
49+
we require different transformation for each data point.
50+
This class helps to take the subset of the dataset
51+
with either training or validation transformation.
5152
5253
We achieve so by adding a train flag to the pytorch subset
54+
55+
Attributes:
56+
dataset (BaseDataset/Dataset): Dataset to sample the subset
57+
indices names (Sequence[int]): Indices to sample from the dataset
58+
train (bool): If we apply train or validation transformation
59+
5360
"""
5461

5562
def __init__(self, dataset: Dataset, indices: Sequence[int], train: bool) -> None:

0 commit comments

Comments
 (0)