(self, output_pth)
| 155 | return self.accelerator.unwrap_model(self.model) |
| 156 | |
| 157 | def init_writer(self, output_pth): |
| 158 | if self.is_main_process: |
| 159 | self.writer = open(output_pth, "w", encoding='utf-8') |
| 160 | def is_main_process(self): |
| 161 | return self.accelerator.is_main_process |
| 162 | def print_in_main(self, *args, **kwargs): |