Starts garbage collection loop. Will block the current thread.
(self, *, context_stack: list[InvocationContext])
| 1091 | logging.info("gc_thread finished") |
| 1092 | |
| 1093 | def _gc_loop(self, *, context_stack: list[InvocationContext]): |
| 1094 | """Starts garbage collection loop. Will block the current thread.""" |
| 1095 | cfg: Checkpointer.Config = self.config |
| 1096 | install_context_stack(context_stack) |
| 1097 | while True: |
| 1098 | if self._gc_stopping.wait(timeout=cfg.gc_loop_interval_seconds): |
| 1099 | break |
| 1100 | self._run_garbage_collection() |
| 1101 | logging.info("GC loop done") |
| 1102 | |
| 1103 | def ckpt_dir(self, step: int) -> str: |
| 1104 | """Obtains the checkpoint dir for the given step.""" |
nothing calls this directly
no test coverage detected