MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / checkpointing

Function checkpointing

k_diffusion/models/flags.py:22–27  ·  view source on GitHub ↗
(enable=True)

Source from the content-addressed store, hash-verified

20
21@contextmanager
22def checkpointing(enable=True):
23 try:
24 old_checkpointing, state.checkpointing = state.checkpointing, enable
25 yield
26 finally:
27 state.checkpointing = old_checkpointing
28
29
30def get_checkpointing():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected