(self, args: TrainingArguments, state: TrainerState, control: TrainerControl, **kwargs)
| 76 | self.rank = torch.distributed.get_rank() |
| 77 | |
| 78 | def on_step_end(self, args: TrainingArguments, state: TrainerState, control: TrainerControl, **kwargs): |
| 79 | if state.global_step in self.steps_to_save: |
| 80 | control.should_save = True |
| 81 | control.should_evaluate = True |
| 82 | if self.rank == 0: |
| 83 | print(f"Saving checkpoint at step {state.global_step}") |
| 84 | return control |
nothing calls this directly
no outgoing calls
no test coverage detected