(self)
| 876 | self.nebula_config = DeepSpeedNebulaConfig(param_dict) |
| 877 | |
| 878 | def _batch_assertion(self): |
| 879 | |
| 880 | train_batch = self.train_batch_size |
| 881 | micro_batch = self.train_micro_batch_size_per_gpu |
| 882 | grad_acc = self.gradient_accumulation_steps |
| 883 | |
| 884 | assert (train_batch > 0), f"Train batch size: {train_batch} has to be greater than 0" |
| 885 | |
| 886 | assert (micro_batch > 0), f"Micro batch size per gpu: {micro_batch} has to be greater than 0" |
| 887 | |
| 888 | assert (grad_acc > 0), f"Gradient accumulation steps: {grad_acc} has to be greater than 0" |
| 889 | |
| 890 | assert train_batch == micro_batch * grad_acc * self.world_size, ( |
| 891 | f"Check batch related parameters. train_batch_size is not equal " |
| 892 | "to micro_batch_per_gpu * gradient_acc_step * world_size " |
| 893 | f"{train_batch} != {micro_batch} * {grad_acc} * {self.world_size}") |
| 894 | |
| 895 | def _set_batch_related_parameters(self): |
| 896 |
no outgoing calls
no test coverage detected