Skip to content

[Bug] ValueError: rollout_routed_experts is required in rollout_data when use_rollout_routing_replay is set. #1909

@fxxkai

Description

@fxxkai

Bug Description

I want to use R3, and set the following cmds:

--use-rollout-routing-replay
--sglang-enable-return-routed-experts

but it doesn't work, the error is:

File "/root/work/externalstorage/gpfsprd/sunjiahui/slime/slime/backends/megatron_utils/actor.py", line 413, in train_actor
self.fill_routing_replay(data_iterator, num_microbatches, rollout_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/work/externalstorage/gpfsprd/sunjiahui/slime/slime/backends/megatron_utils/actor.py", line 269, in fill_routing_replay
raise ValueError(
ValueError: rollout_routed_experts is required in rollout_data when use_rollout_routing_replay is set.

Steps to Reproduce

bash run-qwen3-30B-A3B.sh

Expected Behavior

the generated output has rollout_routed_experts

Actual Behavior

the generated output doesn't has rollout_routed_experts.

Environment

  • slime version:
  • Python version:
  • PyTorch version:
  • CUDA/ROCm version:
  • GPU type and count:
  • OS:
  • SGLang version (if relevant):
  • Megatron-LM version (if relevant):

Logs

I print the keys in output, meta_info. They doesn't return rollout_routed_experts.

(RolloutManager pid=55507) [2026-05-14 07:23:33] sglang_rollout.py:224 - payload keys: dict_keys(['sampling_params', 'return_logprob', 'return_routed_experts', 'input_ids'])
(RolloutManager pid=55507) [2026-05-14 07:23:33] sglang_rollout.py:225 - output keys: dict_keys(['text', 'output_ids', 'meta_info'])
(RolloutManager pid=55507) [2026-05-14 07:23:33] sglang_rollout.py:226 - meta_info keys: dict_keys(['id', 'finish_reason', 'prompt_tokens', 'weight_version', 'total_retractions', 'queue_time', 'prefill_launch_delay', 'prefill_launch_latency', 'prefill_finished_ts', 'input_token_logprobs', 'output_token_logprobs', 'completion_tokens', 'cached_tokens', 'cached_tokens_details', 'e2e_latency', 'request_received_ts', 'request_sent_to_scheduler_ts', 'decode_finished_ts', 'inference_time', 'decode_throughput', 'response_sent_to_client_ts'])
(RolloutManager pid=55507) [2026-05-14 07:23:33] sglang_rollout.py:227 - has routed_experts: False

Additional Context

No response

Pre-submission Checklist

  • I have read the CONTRIBUTING.md and understand the collaboration scope.
  • I have read the documentation and my issue is not addressed there.
  • I have searched for existing issues and this is not a duplicate.
  • I have provided a minimal, reproducible example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions