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)
| 1335 | logger.info(f"model parameter = {num_params}") |
| 1336 | |
| 1337 | def get_batch_info(self): |
| 1338 | """Get all training batch related settings. |
| 1339 | Returns: |
| 1340 | train_batch_size (int): The effective training batch size. This is the amount of data |
| 1341 | samples that leads to one step of model update. |
| 1342 | train_micro_batch_size_per_gpu (int): Batch size to be processed by one GPU in one |
| 1343 | step (without gradient accumulation). |
| 1344 | gradient_accumulation_steps (int): Number of training steps to accumulate gradients |
| 1345 | before averaging and applying them. |
| 1346 | """ |
| 1347 | return ( |
| 1348 | self.train_batch_size, |
| 1349 | self.train_micro_batch_size_per_gpu, |
| 1350 | self.gradient_accumulation_steps, |
| 1351 | ) |
| 1352 | |
| 1353 | def set_train_batch_size(self, train_batch_size): |
| 1354 | """Adjust the global batch size by increasing or decreasing the number of |
nothing calls this directly
no outgoing calls
no test coverage detected