(self, tokenizer, datamodules, num_workers=None, pin_memory=None)
| 37 | """ |
| 38 | |
| 39 | def __init__(self, tokenizer, datamodules, num_workers=None, pin_memory=None): |
| 40 | super().__init__() |
| 41 | |
| 42 | # this line allows to access init params with 'self.hparams' attribute |
| 43 | # also ensures init params will be stored in ckpt |
| 44 | self.save_hyperparameters(logger=False) |
| 45 | |
| 46 | # data transformations |
| 47 | self.tokenizer = AutoTokenizer.from_pretrained(tokenizer) |
| 48 | self.datamodules = datamodules.load(tokenizer=self.tokenizer) |
| 49 | self.data_train: Optional[Dataset] = self.datamodules[datasets.Split.TRAIN] |
| 50 | self.data_val: Optional[Dataset] = self.datamodules[datasets.Split.VALIDATION] |
| 51 | self.data_test: Optional[Dataset] = self.datamodules[datasets.Split.TEST] |
| 52 | |
| 53 | @property |
| 54 | def num_classes(self): |
nothing calls this directly
no test coverage detected