Loads the next batch of data for training.
(self, train_ctx: peft_trainer.PeftTrainer)
| 175 | |
| 176 | @override |
| 177 | def load_next_train_batch(self, train_ctx: peft_trainer.PeftTrainer): # pylint: disable=unused-argument |
| 178 | """Loads the next batch of data for training.""" |
| 179 | try: |
| 180 | self.train_batch = self.train_data_loader.load_next_batch() |
| 181 | except Exception as e: # pylint: disable=broad-exception-caught |
| 182 | max_logging.log(f"Exception in load_next_train_batch: {str(e)}") |
| 183 | self.train_batch = None |
| 184 | return self.train_batch |
| 185 | |
| 186 | @override |
| 187 | def load_next_eval_batch(self, train_ctx: peft_trainer.PeftTrainer): |