Lightning-Universe/lightning-bolts

Wrong case of class variable inside `TinyCIFAR10DataModule`

ggalan87 opened this issue ยท 0 comments

๐Ÿ› Bug

Prior to utilization of TinyCIFAR10DataModule I did a check on its (under review) code. ฮ™ realized that there is a bug/typo inside __init__, where self.extra_args variable is set:

self.extra_args = dict(num_samples=self.num_samples, labels=self.labels)

This is in contrast to self.EXTRA_ARGS which is already defined and used by the methods of the base class as required to pass the correct extra arguments to the underlying dataset:

dataset_train = self.dataset_cls(self.data_dir, train=True, transform=train_transforms, **self.EXTRA_ARGS)
dataset_val = self.dataset_cls(self.data_dir, train=True, transform=val_transforms, **self.EXTRA_ARGS)

A similar case that self.extra_args is used is inside CityscapesDataModule, however there the implementation is self-contained and does not depend on base class for train_dataloader and test_dataloader.

Besides the bug, is there a motivation about why a capitalized version of the variable was preferred inside VisionDataModule?