MCPcopy Create free account
hub / github.com/AIS-SNU/Smart-Infinity / set_batch_fn

Method set_batch_fn

deepspeed/runtime/pipe/engine.py:552–558  ·  view source on GitHub ↗

Execute a post-processing function on input data. Args: fn (function): The function to run.

(self, fn)

Source from the content-addressed store, hash-verified

550 self.data_iterator = iterator
551
552 def set_batch_fn(self, fn):
553 """Execute a post-processing function on input data.
554
555 Args:
556 fn (function): The function to run.
557 """
558 self.batch_fn = fn
559
560 def is_gradient_accumulation_boundary(self):
561 """True if the engine is executing a gradient reduction or optimizer step instruction.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected