Skip to content

docs: fix factual errors in fully-async example page - #1809

Closed
Shi-Dong wants to merge 2 commits into
mainfrom
shi/fix-docs-fully-async
Closed

docs: fix factual errors in fully-async example page#1809
Shi-Dong wants to merge 2 commits into
mainfrom
shi/fix-docs-fully-async

Conversation

@Shi-Dong

@Shi-Dong Shi-Dong commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes factual errors in docs/examples/fully-async.md found during a fact-check of every page under docs/examples/ against the actual code in examples/fully_async/.

  • Quick-start log output: the page showed a fabricated [trainer] iter 1/3000 ... log block. Replaced with the real stdout prints from fully_async_rollout.py (Creating new global async worker..., Starting async rollout generation for N groups, Rollout completed in ...s! Global worker queue size: N).
  • Worker constructor: the doc passed a nonexistent concurrency=args.sglang_server_concurrency kwarg; AsyncRolloutWorker.__init__ only takes (args, data_buffer).
  • Worker loop: the doc showed an invented _producer coroutine. Replaced with a condensed version of the real continuous_worker_loop (reap finished tasks, top up in-flight groups via generate_and_rm_group, done-callback onto the output queue), including the real in-flight cap: --rollout-batch-size groups, or --async-max-concurrent-samples ÷ n_samples_per_prompt when set.
  • Entry function: the doc showed a made-up async signature. The real generate_rollout_fully_async(args, rollout_id, data_buffer, evaluation=False) is synchronous, rejects evaluation mode, drains --rollout-batch-size groups, recycles aborted groups, and sorts by prompt index.
  • What to watch: the doc listed fabricated async/* wandb metrics that the example never logs. Replaced with the real stdout signals plus the standard perf/rollout_time vs perf/actor_train_time comparison.
  • MoE variation: the doc claimed tp=4 ep=8, a nonexistent --sglang-enable-ep-moe flag, and a batch-size recommendation not in the script. run_qwen3_30b_a3b_fully_async.py actually uses TP 8 / EP 8, one 8-GPU SGLang engine, --use-tis, and demonstrates the --pause-generation-mode × --update-weight-transfer-mode combinations — every pairing except in_place + p2p, which the script rejects.
  • Partial rollout: the doc claimed unfinished trajectories are "saved to disk and resumed". In reality this example recycles aborted groups to the in-memory data buffer but calls reset_for_retry() first, so they regenerate from the prompt; true resume-from-partial is the stock --partial-rollout behavior of the built-in rollout function, which this custom drain loop bypasses. The section now states exactly that.

Test plan

  • Verified all replacement snippets against examples/fully_async/fully_async_rollout.py and run_qwen3_30b_a3b_fully_async.py on current main
  • Docs render check

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@Zhichenzzz

Copy link
Copy Markdown
Contributor

LGTM! Lets wait till #1717 and #1740 are merged

@Shi-Dong Shi-Dong closed this Jul 29, 2026
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