(self)
| 137 | torch.save(checkpoint, f"{checkpoint_dir}/epoch{epoch}-step{step}.ckpt") |
| 138 | |
| 139 | def configure_optimizers(self): |
| 140 | self.lr_scheduler = get_scheduler( |
| 141 | name="constant", |
| 142 | optimizer=self.opt, |
| 143 | num_warmup_steps=self.args.lr_warmup_steps * self.args.gradient_accumulation_steps, |
| 144 | num_training_steps=self.args.max_train_steps * self.args.gradient_accumulation_steps, |
| 145 | ) |
| 146 | return [self.opt], [self.lr_scheduler] |
| 147 | |
| 148 | |
| 149 | def create_logger(logging_dir): |
nothing calls this directly
no outgoing calls
no test coverage detected