MCPcopy Create free account
hub / github.com/OpenMOSS/rope_pp / on_step_end

Method on_step_end

utils/callback_utils.py:78–84  ·  view source on GitHub ↗
(self, args: TrainingArguments, state: TrainerState, control: TrainerControl, **kwargs)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected