Skip to content

[Fix] Drain owned Trials and rollout services on driver exit - #2389

Open
jayhenry wants to merge 1 commit into
feat/mini-agent-sampling-loopfrom
fix/mini-agent-driver-shutdown
Open

jayhenry wants to merge 1 commit into
feat/mini-agent-sampling-loopfrom
fix/mini-agent-driver-shutdown

Conversation

@jayhenry

@jayhenry jayhenry commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

Layer 9 of 10 in the Mini-Agent stack. Base feat/mini-agent-sampling-loop. Head fix/mini-agent-driver-shutdown.

Review scope

Drain owned Trial tasks and rollout services before disconnecting the driver from Ray. The PID guard keeps driver teardown owned by the driver when a child is forked. Review signal ordering and cleanup in both trainer modes.

Validation

The working tree and Python compilation were checked at this layer. The Agent import-boundary check and the python -S protocol import passed. The relevant CPU cases passed in pt29_glm2 with CUDA_VISIBLE_DEVICES='' as part of the combined python -B -m pytest -ra runs.

tests/rl/test_driver_signal_cleanup.py tests/rl/test_trainer_rollout_shutdown.py tests/rl/test_rl_colocate_trainer.py tests/rl/test_rl_disaggregated_trainer.py tests/rl/test_rl_trainer_checkpoint.py

Keep Ray and signal ownership active through trial cleanup and service shutdown, and preserve the original training exception if shutdown also fails.
@jayhenry
jayhenry added this pull request to stack #2391 December 4, 2026 15:56

This branch has not been deployed

No deployments
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.

1 participant