MCPcopy Create free account
hub / github.com/PolymathicAI/AstroCLIP / __init__

Method __init__

astroclip/data/datamodule.py:14–23  ·  view source on GitHub ↗
(
        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
13class 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

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected