MCPcopy Create free account
hub / github.com/AIS-SNU/Smart-Infinity / get_batch_info

Method get_batch_info

deepspeed/runtime/engine.py:395–409  ·  view source on GitHub ↗

Get all training batch related settings. Returns: train_batch_size (int): The effective training batch size. This is the amount of data samples that leads to one step of model update. train_micro_batch_size_per_gpu (int): Batch size to be processed by

(self)

Source from the content-addressed store, hash-verified

393 logger.info(f"model parameter = {num_params}")
394
395 def get_batch_info(self):
396 """Get all training batch related settings.
397 Returns:
398 train_batch_size (int): The effective training batch size. This is the amount of data
399 samples that leads to one step of model update.
400 train_micro_batch_size_per_gpu (int): Batch size to be processed by one GPU in one
401 step (without gradient accumulation).
402 gradient_accumulation_steps (int): Number of training steps to accumulate gradients
403 before averaging and applying them.
404 """
405 return (
406 self.train_batch_size,
407 self.train_micro_batch_size_per_gpu,
408 self.gradient_accumulation_steps,
409 )
410
411 def set_train_batch_size(self, train_batch_size):
412 """Adjust the global batch size by increasing or decreasing the number of

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected