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)
| 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 |
nothing calls this directly
no outgoing calls
no test coverage detected