Skip to main content

Module interrupt

Module interrupt 

Source
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:

  1. Save a checkpoint with the Interrupted phase
  2. Clean up temporary files
  3. Exit gracefully

Structs§

InterruptContext
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.