MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / _set_bounds

Method _set_bounds

deepspeed/runtime/pipe/module.py:540–548  ·  view source on GitHub ↗

Manually define the range of layers that will be built on this process. These boundaries are treated as list slices and so start is inclusive and stop is exclusive. The default of None for both results in all layers being built locally.

(self, start=None, stop=None)

Source from the content-addressed store, hash-verified

538 raise RuntimeError(f'Layer {layer_idx} not owned? parts={self.parts}')
539
540 def _set_bounds(self, start=None, stop=None):
541 """Manually define the range of layers that will be built on this process.
542
543 These boundaries are treated as list slices and so start is inclusive and stop is
544 exclusive. The default of None for both results in all layers being built
545 locally.
546 """
547 self._local_start = start
548 self._local_stop = stop
549
550 def set_checkpoint_interval(self, interval):
551 assert interval >= 0

Callers 2

_partition_layersMethod · 0.95
_buildMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected