Skip to content

Fix diagnostics stop lifecycle - #1271

Open
lzy-edu wants to merge 5 commits into
flagos-ai:mainfrom
lzy-edu:agent/fix-diagnostics-stop-lifecycle
Open

Fix diagnostics stop lifecycle#1271
lzy-edu wants to merge 5 commits into
flagos-ai:mainfrom
lzy-edu:agent/fix-diagnostics-stop-lifecycle

Conversation

@lzy-edu

@lzy-edu lzy-edu commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

PR Category

Train

PR Types

Bug Fixes

PR Description

This PR fixes the diagnostics stop lifecycle for GPU progress heartbeat monitoring.

  • Persist the active diagnostics run ID atomically when a training run starts.
  • Reuse the active run ID during action=stop, instead of generating a new ID that points to a different heartbeat directory.
  • Stop the node-zero heartbeat monitor before terminating training workers.
  • Coordinate nonzero nodes with node zero before stopping their local workers and GPU health collectors.
  • Validate recorded diagnostic PIDs before terminating processes, use bounded graceful shutdown with a SIGKILL fallback, and clean stale lifecycle files safely.
  • Preserve the original training exit code and clean the active run ID after a normal exit.
  • Add unit tests covering run ID persistence, stop ID reuse, missing active state, multi-node stop ordering, PID validation, and generated run/stop scripts.

@lzy-edu
lzy-edu requested a review from aoyulong as a code owner August 19, 2026 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants