-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor datamodules/datasets (#338)
* Remove try: ... except: ... * Fix experience_source * Fix imagenet * Fix kitti * Fix sklearn * Fix vocdetection * Fix typo * Remove duplicate * Fix by flake8 * Add optional packages availability vars * binary_mnist * Use pl_bolts._SKLEARN_AVAILABLE * Apply isort * cifar10 * mnist * cityscapes * fashion mnist * ssl_imagenet * stl10 * cifar10 * dummy * fix city * fix stl10 * fix mnist * ssl_amdim * remove unused DataLoader and fix docs * use from ... import ... * fix pragma: no cover * Fix forward reference in annotations * binmnist * Same order as imports * Move vars from __init__ to utils/__init__ * Remove vars from __init__ * Update vars * Apply isort
- Loading branch information
1 parent
2dfd598
commit 58536c2
Showing
22 changed files
with
176 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,98 +1,36 @@ | ||
from pl_bolts.datamodules.async_dataloader import AsynchronousLoader | ||
|
||
__all__ = [] | ||
|
||
try: | ||
from pl_bolts.datamodules.binary_mnist_datamodule import BinaryMNISTDataModule | ||
except ModuleNotFoundError: | ||
pass | ||
else: | ||
__all__ += ['BinaryMNISTDataModule'] | ||
|
||
try: | ||
from pl_bolts.datamodules.cifar10_datamodule import CIFAR10DataModule, TinyCIFAR10DataModule | ||
except ModuleNotFoundError: | ||
pass | ||
else: | ||
__all__ += ['CIFAR10DataModule', 'TinyCIFAR10DataModule'] | ||
|
||
try: | ||
from pl_bolts.datamodules.experience_source import ( | ||
DiscountedExperienceSource, | ||
ExperienceSource, | ||
ExperienceSourceDataset, | ||
) | ||
except ModuleNotFoundError: | ||
pass | ||
else: | ||
__all__ += ['ExperienceSourceDataset', 'ExperienceSource', 'DiscountedExperienceSource'] | ||
|
||
try: | ||
from pl_bolts.datamodules.fashion_mnist_datamodule import FashionMNISTDataModule | ||
except ModuleNotFoundError: | ||
pass | ||
else: | ||
__all__ += ['FashionMNISTDataModule'] | ||
|
||
try: | ||
from pl_bolts.datamodules.imagenet_datamodule import ImagenetDataModule | ||
except ModuleNotFoundError: | ||
pass | ||
else: | ||
__all__ += ['ImagenetDataModule'] | ||
|
||
try: | ||
from pl_bolts.datamodules.mnist_datamodule import MNISTDataModule | ||
except ModuleNotFoundError: | ||
pass | ||
else: | ||
__all__ += ['MNISTDataModule'] | ||
|
||
try: | ||
from pl_bolts.datamodules.sklearn_datamodule import SklearnDataModule, SklearnDataset, TensorDataset | ||
except ModuleNotFoundError: | ||
pass | ||
else: | ||
__all__ += ['SklearnDataset', 'SklearnDataModule', 'TensorDataset'] | ||
|
||
try: | ||
from pl_bolts.datamodules.ssl_imagenet_datamodule import SSLImagenetDataModule | ||
except ModuleNotFoundError: | ||
pass | ||
else: | ||
__all__ += ['SSLImagenetDataModule'] | ||
|
||
try: | ||
from pl_bolts.datamodules.stl10_datamodule import STL10DataModule | ||
except ModuleNotFoundError: | ||
pass | ||
else: | ||
__all__ += ['STL10DataModule'] | ||
|
||
try: | ||
from pl_bolts.datamodules.vocdetection_datamodule import VOCDetectionDataModule | ||
except ModuleNotFoundError: | ||
pass | ||
else: | ||
__all__ += ['VOCDetectionDataModule'] | ||
|
||
try: | ||
from pl_bolts.datamodules.cityscapes_datamodule import CityscapesDataModule | ||
except ModuleNotFoundError: # pragma: no-cover | ||
pass | ||
else: | ||
__all__ += ['CityscapesDataModule'] | ||
|
||
try: | ||
from pl_bolts.datasets.kitti_dataset import KittiDataset | ||
except ModuleNotFoundError: | ||
pass | ||
else: | ||
__all__ += ['KittiDataset'] | ||
|
||
try: | ||
from pl_bolts.datamodules.kitti_datamodule import KittiDataModule | ||
except ModuleNotFoundError: | ||
pass | ||
else: | ||
__all__ += ['KittiDataModule'] | ||
from pl_bolts.datamodules.binary_mnist_datamodule import BinaryMNISTDataModule | ||
from pl_bolts.datamodules.cifar10_datamodule import CIFAR10DataModule, TinyCIFAR10DataModule | ||
from pl_bolts.datamodules.cityscapes_datamodule import CityscapesDataModule | ||
from pl_bolts.datamodules.experience_source import DiscountedExperienceSource, ExperienceSource, ExperienceSourceDataset | ||
from pl_bolts.datamodules.fashion_mnist_datamodule import FashionMNISTDataModule | ||
from pl_bolts.datamodules.imagenet_datamodule import ImagenetDataModule | ||
from pl_bolts.datamodules.kitti_datamodule import KittiDataModule | ||
from pl_bolts.datamodules.mnist_datamodule import MNISTDataModule | ||
from pl_bolts.datamodules.sklearn_datamodule import SklearnDataModule, SklearnDataset, TensorDataset | ||
from pl_bolts.datamodules.ssl_imagenet_datamodule import SSLImagenetDataModule | ||
from pl_bolts.datamodules.stl10_datamodule import STL10DataModule | ||
from pl_bolts.datamodules.vocdetection_datamodule import VOCDetectionDataModule | ||
from pl_bolts.datasets.kitti_dataset import KittiDataset | ||
|
||
__all__ = [ | ||
'AsynchronousLoader', | ||
'BinaryMNISTDataModule', | ||
'CIFAR10DataModule', | ||
'TinyCIFAR10DataModule', | ||
'CityscapesDataModule', | ||
'DiscountedExperienceSource', | ||
'ExperienceSource', | ||
'ExperienceSourceDataset', | ||
'FashionMNISTDataModule', | ||
'ImagenetDataModule', | ||
'KittiDataModule', | ||
'MNISTDataModule', | ||
'SklearnDataModule', | ||
'SklearnDataset', | ||
'TensorDataset', | ||
'SSLImagenetDataModule', | ||
'STL10DataModule', | ||
'VOCDetectionDataModule', | ||
'KittiDataset', | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.