Skip to content

Commit 351b5be

Browse files
committed
Run most R3 e2e tests through the output store
Each R3 builder gains an off-by-default use_output_store case field, and twelve tests across Megatron, FSDP and torchtitan turn it on, so CI exercises the store with fully async, MTP speculative decoding, DeepEP, FP8, CP and PP. command_utils.get_output_store_args holds the flags. fsdp/r3/test_qwen3_30b_a3b_r3.py stays inline to guard the inline R3 path.
1 parent b941e82 commit 351b5be

20 files changed

Lines changed: 44 additions & 1 deletion

‎miles/utils/external_utils/command_utils/__init__.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
get_default_wandb_args,
1717
get_env_enable_infinite_run,
1818
get_mooncake_object_store_args,
19+
get_output_store_args,
1920
repo_base_dir,
2021
rsync_cmd,
2122
)
@@ -36,6 +37,7 @@
3637
"get_default_wandb_args",
3738
"get_env_enable_infinite_run",
3839
"get_mooncake_object_store_args",
40+
"get_output_store_args",
3941
"repo_base_dir",
4042
"resolve_extra_env_vars",
4143
"resolve_hardware",

‎miles/utils/external_utils/command_utils/common.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,11 @@ def get_mooncake_object_store_args(
237237
)
238238

239239

240+
def get_output_store_args(global_segment_size: str | None = None) -> str:
241+
"""--use-output-store with the Mooncake object store it lives in."""
242+
return f"{get_mooncake_object_store_args(global_segment_size=global_segment_size)}--use-output-store "
243+
244+
240245
def _is_tcp_server_ready(host: str, port: int) -> bool:
241246
try:
242247
with socket.create_connection((host, port), timeout=1):

‎miles/utils/external_utils/command_utils/legacy.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
get_default_wandb_args,
2020
get_env_enable_infinite_run,
2121
get_mooncake_object_store_args,
22+
get_output_store_args,
2223
repo_base_dir,
2324
rsync_cmd,
2425
)
@@ -48,6 +49,7 @@
4849
"get_default_wandb_args",
4950
"get_env_enable_infinite_run",
5051
"get_mooncake_object_store_args",
52+
"get_output_store_args",
5153
"hf_download_dataset",
5254
"repo_base_dir",
5355
"resolve_hardware",

‎tests/e2e/fsdp/r3/_common.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class CaseConfig:
2525
rollout_num_gpus_per_engine: int
2626
sglang_attention_backend: str = "fa3"
2727
attn_implementation: str = "flash_attention_3"
28+
# Send the replay arrays through the output store (--use-output-store) instead of inline.
29+
use_output_store: bool = False
2830

2931

3032
def prepare(case: CaseConfig) -> None:
@@ -83,6 +85,8 @@ def execute(case: CaseConfig, wandb_file: str) -> None:
8385
)
8486

8587
replay_args = "--use-rollout-routing-replay "
88+
if case.use_output_store:
89+
replay_args += command_utils.get_output_store_args()
8690

8791
sglang_args = (
8892
f"--rollout-num-gpus-per-engine {case.rollout_num_gpus_per_engine} "

‎tests/e2e/fsdp/r3/test_glm47_flash_r3.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
register_ci_gate(metric_key="perf/actor_train_mfu")
2525

2626
CASE = CaseConfig(
27+
use_output_store=True,
2728
model_name="GLM-4.7-Flash",
2829
hf_repo="zai-org/GLM-4.7-Flash",
2930
num_gpus=8,

‎tests/e2e/fsdp/r3/test_qwen3_5_35b_a3b_r3.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
register_ci_gate(metric_key="perf/actor_train_mfu")
1313

1414
CASE = CaseConfig(
15+
use_output_store=True,
1516
model_name="Qwen3.5-35B-A3B",
1617
hf_repo="Qwen/Qwen3.5-35B-A3B",
1718
num_gpus=8,

‎tests/e2e/megatron/model_scripts/test_deepseek_v32_5layer_fp8.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
from tests.ci.ci_register import register_cuda_ci
1717
from tests.ci.metric_history import register_ci_gate
1818

19+
from miles.utils.external_utils import command_utils
20+
1921
register_cuda_ci(
2022
est_time=1300, suite="stage-c-4-gpu-h200", labels=["megatron", "model-scripts"], hardware=["hopper"], num_gpus=4
2123
)
@@ -45,6 +47,7 @@ def _args() -> ScriptArgs:
4547
extra_args=(
4648
"--ci-test --check-weight-update-allow-quant-error --bf16 "
4749
"--use-rollout-routing-replay "
50+
f"{command_utils.get_output_store_args()}"
4851
"--skip-actor-forward-only "
4952
"--sglang-disable-shared-experts-fusion "
5053
# TP2 doubles the per-rank activations of the script's TP4 token budget

‎tests/e2e/megatron/test_glm47_flash/_common.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ class CaseConfig:
3939
# Off: no draft runs, the trainer builds no MTP layer, and the weight check covers the target only.
4040
use_spec: bool = True
4141
use_r3: bool = True
42+
# Send the replay arrays through the output store (--use-output-store) instead of inline.
43+
use_output_store: bool = False
4244
# "bshd" (Megatron only) trains fixed micro-batches of micro_batch_size samples instead of
4345
# dynamic THD batches.
4446
qkv_format: str = "thd"
@@ -282,6 +284,8 @@ def build_train_args(case: CaseConfig, *, wandb_file: str) -> str:
282284

283285
if case.fully_async:
284286
misc_args += "--fully-async "
287+
if case.use_output_store:
288+
misc_args += command_utils.get_output_store_args()
285289

286290
if case.use_deepep:
287291
misc_args += "--moe-token-dispatcher-type flex --moe-enable-deepep "

‎tests/e2e/megatron/test_glm47_flash/test_nospec_r3_bf16_deepep_sgl_dpattn2x2_meg_tp2cp2_bshd.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
sglang_deepep_dispatcher_output_dtype="bf16",
4646
use_spec=False,
4747
use_r3=True,
48+
use_output_store=True,
4849
)
4950

5051

‎tests/e2e/megatron/test_glm47_flash/test_spec_mtptrain_r3_bf16_sgl_tp2_meg_tp1cp2_disagg.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
# engine, with R3, MTP training and EAGLE on. Each train GPU holds the dense part plus half the
2525
# experts, so the response cap and max_tokens_per_gpu keep each CP rank to about 2k tokens.
2626
CASE = CaseConfig(
27+
use_output_store=True,
2728
use_deepep=False,
2829
num_gpus_per_node=2,
2930
cp_size=2,

0 commit comments

Comments
 (0)