MCPcopy Create free account
hub / github.com/AI-Hypercomputer/maxtext / load_next_train_batch

Method load_next_train_batch

src/MaxText/sft/hooks.py:177–184  ·  view source on GitHub ↗

Loads the next batch of data for training.

(self, train_ctx: peft_trainer.PeftTrainer)

Source from the content-addressed store, hash-verified

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):

Calls 1

load_next_batchMethod · 0.45

Tested by 1