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

Function reflow_enabled

deepspeed/runtime/reflow/engine.py:21–26  ·  view source on GitHub ↗

Whether this run uses Reflow: the `reflow` config block is set and ZenFlow is not.

(engine: "DeepSpeedEngine")

Source from the content-addressed store, hash-verified

19
20
21def reflow_enabled(engine: "DeepSpeedEngine") -> bool:
22 """Whether this run uses Reflow: the `reflow` config block is set and ZenFlow is not."""
23 if engine._config.zero_config.reflow is None:
24 return False
25 # The throughput timer is built before _configure_zenflow runs, so read the flag defensively.
26 return not getattr(engine, "zenflow", False)
27
28
29def reject_optimizer_without_reflow(engine: "DeepSpeedEngine", optimizer):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected