Method
__init__
(
self,
path: str,
columns: List[str] = ["image", "spectrum"],
batch_size: int = 512,
num_workers: int = 10,
collate_fn: Callable[[Dict[str, Tensor]], Dict[str, Tensor]] = None,
)
Source from the content-addressed store, hash-verified
| 12 | |
| 13 | class AstroClipDataloader(L.LightningDataModule): |
| 14 | def __init__( |
| 15 | self, |
| 16 | path: str, |
| 17 | columns: List[str] = ["image", "spectrum"], |
| 18 | batch_size: int = 512, |
| 19 | num_workers: int = 10, |
| 20 | collate_fn: Callable[[Dict[str, Tensor]], Dict[str, Tensor]] = None, |
| 21 | ) -> None: |
| 22 | super().__init__() |
| 23 | self.save_hyperparameters() |
| 24 | |
| 25 | def setup(self, stage: str) -> None: |
| 26 | self.dataset = datasets.load_from_disk(self.hparams.path) |
Callers
nothing calls this directly
Tested by
no test coverage detected