Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
4c44c7c
add ci for fault tolerance
yitianlian Dec 26, 2025
8dfecf3
change args
yitianlian Dec 26, 2025
92b5e79
fix format error
yitianlian Dec 26, 2025
0a04df8
add short ci
yitianlian Dec 28, 2025
ae9ef43
rm long ci test for fault tolerance
yitianlian Dec 28, 2025
0eecf74
fix
yitianlian Dec 28, 2025
d0d5316
Merge branch 'main' into ci_fault
yitianlian Dec 28, 2025
fe72c7f
fix
yitianlian Dec 28, 2025
d9bd7eb
fix error
yitianlian Dec 28, 2025
d2901af
more gpu debug
yitianlian Dec 29, 2025
2547c23
more gpu debug
yitianlian Dec 29, 2025
9701fb8
Merge branch 'main' into ci_fault
yitianlian Dec 29, 2025
15ec05e
fix linting
yitianlian Dec 29, 2025
bb0a648
fix
yitianlian Dec 29, 2025
a6da749
fix
yitianlian Dec 29, 2025
e92562b
fix
yitianlian Dec 29, 2025
ef03ff4
fix fault tolerance
yitianlian Dec 29, 2025
8752338
fix linting
yitianlian Dec 30, 2025
b7370c3
revert
yitianlian Dec 30, 2025
507b548
better fault tolerance
yitianlian Dec 31, 2025
e668bd2
Merge branch 'main' into ci_fault
yitianlian Dec 31, 2025
f50f1bf
rm
yitianlian Dec 31, 2025
98ac955
Merge branch 'main' into ci_fault
yitianlian Dec 31, 2025
8c2506f
linting
yitianlian Dec 31, 2025
c5a3246
linting
yitianlian Jan 1, 2026
8d220bc
Merge branch 'main' into ci_fault
yitianlian Jan 3, 2026
b4a8856
del first sume
yitianlian Jan 3, 2026
a29cc32
clean code
yitianlian Jan 4, 2026
d9f544d
fix
yitianlian Jan 4, 2026
054a4aa
minor
yitianlian Jan 4, 2026
8fb1a95
clean code
yitianlian Jan 4, 2026
f5dadcd
Merge branch 'main' into ci_fault
yitianlian Jan 4, 2026
cf83c42
clean code
yitianlian Jan 5, 2026
8b17671
reorg
yitianlian Jan 5, 2026
e521ec2
add sync fault tolerance ci
yitianlian Jan 5, 2026
ed42cbc
lint
yitianlian Jan 5, 2026
a79d07c
Merge branch 'main' into ci_fault
yitianlian Jan 5, 2026
9b21a08
Merge branch 'main' into ci_fault
yitianlian Jan 5, 2026
aed04a3
add ci
yitianlian Jan 5, 2026
f65a5d6
add ci
yitianlian Jan 5, 2026
355e5a3
fix ci
yitianlian Jan 6, 2026
a361350
minor fix
yitianlian Jan 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions slime/backends/sglang_utils/sglang_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,10 @@ def stop_profile(self):
response.raise_for_status()
return response

def simulate_crash(self):
logger.warning(f"Simulating crash on engine {self.server_host}:{self.server_port}...")
kill_process_tree(self.process.pid)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Guard simulate_crash when no local process exists

The new simulate_crash unconditionally dereferences self.process.pid, but self.process is only created in _init_normal; in --rollout-external mode (or any path where no local server process is launched), this attribute is never set. If CI enables fault injection in an external-engine setup, the Ray task will raise AttributeError instead of simulating a crash, which defeats the test and can break the rollout manager. Consider checking self.args.rollout_external (or self.process is not None) before calling kill_process_tree.

Useful? React with 👍 / 👎.



def _compute_server_args(
args,
Expand Down
15 changes: 15 additions & 0 deletions slime/ray/rollout.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import time
from pathlib import Path
from typing import Any
import threading

import numpy as np
import ray
Expand Down Expand Up @@ -72,6 +73,20 @@ def __init__(self, args, pg):
self._metric_checker = MetricChecker.maybe_create(args)
if self.args.use_fault_tolerance:
self._health_monitor = RolloutHealthMonitor(self, args)
if self.args.ci_test:
self._schedule_ci_fault_injection()

def _schedule_ci_fault_injection(self):
def _inject_fault():
# Wait for system to stabilize and training to start
time.sleep(200)
if self.all_rollout_engines and self.all_rollout_engines[0]:
logger.info("CI Fault Injection: Simulating crash on engine 0")
# We use remote call to make the actor process exit
self.all_rollout_engines[0].simulate_crash.remote()

t = threading.Thread(target=_inject_fault, daemon=True)
t.start()

def dispose(self):
if self._metric_checker is not None:
Expand Down
7 changes: 7 additions & 0 deletions tests/test_qwen2.5_0.5B_gsm8k_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ def execute():
"--ci-metric-checker-threshold 0.55 " # loose threshold at 250 step
)

fault_tolerance_args = (
"--use-fault-tolerance "
"--rollout-health-check-interval 10 "
"--rollout-health-check-timeout 30 "
)

misc_args = (
# default dropout in megatron is 0.1
"--attention-dropout 0.0 "
Expand All @@ -112,6 +118,7 @@ def execute():
f"{eval_args} "
f"{sglang_args} "
f"{ci_args} "
f"{fault_tolerance_args} "
f"{misc_args} "
)

Expand Down