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

Method __init__

utils/callback_utils.py:73–76  ·  view source on GitHub ↗
(self, steps_to_save)

Source from the content-addressed store, hash-verified

71
72class CheckpointingCallback(TrainerCallback):
73 def __init__(self, steps_to_save):
74 self.steps_to_save = steps_to_save
75
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:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected