Expand description
Interrupt signal handling for graceful checkpoint save.
This module provides signal handling for the Ralph pipeline, ensuring clean shutdown when the user interrupts with Ctrl+C.
When an interrupt is received, the handler will:
- Save a checkpoint with the
Interruptedphase - Clean up temporary files
- Exit gracefully
Structs§
- Interrupt
Context - Context needed to save a checkpoint when interrupted.
Functions§
- clear_
interrupt_ context - Clear the global interrupt context.
- set_
interrupt_ context - Set the global interrupt context.
- setup_
interrupt_ handler - Set up the interrupt handler for graceful shutdown with checkpoint saving.