| 9 | |
| 10 | |
| 11 | class Module(ABC): |
| 12 | @abstractmethod |
| 13 | def training_step(self, batch: Dict[str, Any], batch_idx: int) -> Dict: |
| 14 | raise NotImplementedError |
| 15 | |
| 16 | @abstractmethod |
| 17 | def validation_step(self, batch: Dict[str, Any], batch_idx: int) -> Dict: |
| 18 | raise NotImplementedError |
| 19 | |
| 20 | @abstractmethod |
| 21 | def configure_optimizers( |
| 22 | self, num_iterations_per_epoch: int, num_epochs: int |
| 23 | ) -> Tuple[ |
| 24 | torch.optim.Optimizer, |
| 25 | Optional[Dict], |
| 26 | Optional[Dict], |
| 27 | ]: |
| 28 | raise NotImplementedError |
| 29 | |
| 30 | def on_train_epoch_end(self, trainer_instance=None): |
| 31 | pass |
| 32 | |
| 33 | def on_validation_epoch_end(self, trainer_instance=None): |
| 34 | pass |
| 35 | |
| 36 | def on_train_batch_end( |
| 37 | self, outputs: Dict, batch: Dict, batch_idx: int, trainer_instance=None |
| 38 | ): |
| 39 | pass |
| 40 | |
| 41 | def on_validation_batch_end( |
| 42 | self, outputs: Dict, batch: Dict, batch_idx: int, trainer_instance=None |
| 43 | ): |
| 44 | pass |
| 45 | |
| 46 | def on_train_batch_start(self, batch: Dict, batch_idx: int): |
| 47 | pass |
| 48 | |
| 49 | def on_train_epoch_start(self, trainer_instance=None): |
| 50 | pass |
nothing calls this directly
no outgoing calls
no test coverage detected