MCPcopy
hub / github.com/huggingface/transformers / remove_callback

Method remove_callback

src/transformers/trainer.py:4400–4409  ·  view source on GitHub ↗

Remove a callback from the current list of [`~transformers.TrainerCallback`]. Args: callback (`type` or [`~transformers.TrainerCallback]`): A [`~transformers.TrainerCallback`] class or an instance of a [`~transformers.TrainerCallback`]. In the

(self, callback: type[TrainerCallback] | TrainerCallback)

Source from the content-addressed store, hash-verified

4398 return self.callback_handler.pop_callback(callback)
4399
4400 def remove_callback(self, callback: type[TrainerCallback] | TrainerCallback) -> None:
4401 """
4402 Remove a callback from the current list of [`~transformers.TrainerCallback`].
4403
4404 Args:
4405 callback (`type` or [`~transformers.TrainerCallback]`):
4406 A [`~transformers.TrainerCallback`] class or an instance of a [`~transformers.TrainerCallback`]. In the
4407 first case, will remove the first member of that class found in the list of callbacks.
4408 """
4409 self.callback_handler.remove_callback(callback)
4410
4411 # ---- Utilities ----
4412

Calls

no outgoing calls