Skip to content

clean up fully async example and mv to examples/infra_features - #2485

Merged
Shi-Dong merged 6 commits into
mainfrom
yueming/fully-async-example-move
Aug 13, 2026
Merged

clean up fully async example and mv to examples/infra_features#2485
Shi-Dong merged 6 commits into
mainfrom
yueming/fully-async-example-move

Conversation

@yueming-yuan

Copy link
Copy Markdown
Collaborator

The fully-async example is an infra feature and belongs under examples/infra_features/, next to random_async, true_on_policy and the rest — random_async/README.md already calls itself its "minimal sibling".

The shell launcher goes with the move

run-qwen3-4b-fully_async.sh is deleted rather than ported. It was the only shell launcher of the three in that directory, and it demonstrated nothing the two python ones do not — the three changes the README calls out (train_async.py, MILES_EXPERIMENTAL_ROLLOUT_REFACTOR=1, --fully-async) are all present in run_qwen3_5_4b_fully_async_eval.py, which is the same 4B size class and is now the documented quick start. The only thing unique to it was a commented-out --max-weight-staleness, which the README explains anyway.

What the move touches beyond the paths

external_eval_fn is loaded by dotted module path, not by file path, so the move is not purely mechanical. Three call sites follow it:

  • tests/fast/rollout/test_checkpoint_eval.pyimportlib.import_module(...), and this one runs in CI
  • tests/e2e/megatron/test_qwen3_4b_fully_async_eval.py--eval-function-path ...
  • the launcher itself, run_qwen3_5_4b_fully_async_eval.py

Plus the docstring reference in miles/rollout/checkpoint_eval.py, the random_async README, and the two doc pages. Incidentally the example README's file list never mentioned run_qwen3_30b_a3b_fully_async.py; it does now.

Testing

pytest tests/fast/rollout/test_checkpoint_eval.py tests/manual/launch_scripts tests/fast/launch_scripts tests/fast/test_ray_launcher_unbuffering.py — 586 passed. The first of those is what proves the dotted path still resolves; the last is the guard that counts ray launchers, which drops by one with the deleted script. pre-commit run --all-files clean, and no doc page links at the old location.

The fully-async example is an infra feature, so it belongs next to random_async,
true_on_policy and the other entries under examples/infra_features/ -- random_async's
README already describes itself as its "minimal sibling".

run-qwen3-4b-fully_async.sh goes with the move rather than being ported. It was the only
shell launcher of the three in the directory and demonstrated nothing the two python ones
do not: the three changes the README calls out (train_async.py,
MILES_EXPERIMENTAL_ROLLOUT_REFACTOR=1, --fully-async) are all in
run_qwen3_5_4b_fully_async_eval.py, which is the same 4B size class and now the documented
quick start. The only thing unique to the .sh was a commented-out --max-weight-staleness,
and the README already explains that knob.

external_eval_fn is imported by dotted path in two places -- tests/fast/rollout/
test_checkpoint_eval.py and tests/e2e/megatron/test_qwen3_4b_fully_async_eval.py -- so both
move to examples.infra_features.fully_async, along with the same path inside the launcher
itself and the docstring reference in miles/rollout/checkpoint_eval.py.

The README's file list was also missing run_qwen3_30b_a3b_fully_async.py; it is listed now.
examples/README.md still had it as a top-level recipe, with a ./fully_async link that no
longer resolves. Its group description already covered the move -- infra_features/README.md
names "the async rollout loop" as one of the behaviours its examples exercise.
Roughly 30 of its 48 lines restated the two doc pages, which together run 583 lines and
cover the same ground in more depth: "How It Works" is the walkthrough page's "What's
happening underneath", "Config Differences" is its "What changes vs. the default recipe",
and the Evaluation section is a summary of the user guide's three eval modes. Duplicated
prose in a README nobody updates alongside the docs is a drift liability, so it is replaced
by links to both pages.

Two things were wrong rather than merely redundant. The README named the external eval fn
as `external_eval_fn.ExternalSglangEvalFn`, but --eval-function-path takes the dotted module
path, so anyone copying it got an ImportError; it now matches what the launcher passes. And
`MILES_EXPERIMENTAL_ROLLOUT_REFACTOR=1` was stated twice within forty lines.

Also points at examples/experimental/openenv/glm52_tbench2 as the frontier-scale reading of
the same flag: GLM-5.2 744B-A40B on terminal-bench-2 across 16 GB300 nodes, one Daytona
sandbox per episode.
They were buried in a See also section at the bottom; a reader landing in this directory
should see where the real documentation is before scrolling. They are also full
https://miles.radixark.com/docs/... URLs now, matching the root README: the site-relative
form I used first does not resolve when GitHub renders the file.

The GLM-5.2 pointer keeps its own section at the end, since it is a next step rather than
required reading.
@nblintao

nblintao commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

probably need to rebase and fix conflicts. i added auto doc webpage generation. now docs/examples fully mirrors /examples

@nblintao nblintao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Need to rebase - we no longer need manual changes to docs/examples/fully-async.md

@Shi-Dong
Shi-Dong merged commit 6033ac0 into main Aug 13, 2026
17 of 20 checks passed
@Shi-Dong
Shi-Dong deleted the yueming/fully-async-example-move branch August 13, 2026 02:58
@fzyzcjy fzyzcjy mentioned this pull request Aug 13, 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.

4 participants