Skip to content

[rl] fix CI timeout issue by properly tear down for vllm engine V2 - #3365

Merged
wwwjn merged 2 commits into
mainfrom
rl-fix-ci-timeout
May 20, 2026
Merged

wwwjn merged 2 commits into
mainfrom
rl-fix-ci-timeout

Conversation

@wwwjn

@wwwjn wwwjn commented May 15, 2026 •

Copy link
Copy Markdown
Contributor

RL integration test failure because of timeout.

  • The training finished, but stuck in tear down step and finally timeout
  • It starts when we switch to vLLM engine v2

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label May 15, 2026
@wwwjn wwwjn changed the title [DO NOT MERGE] [rl] fix CI timeout issue [rl] fix CI timeout issue by properly tear down for vllm engine V2 May 16, 2026
@wwwjn

wwwjn commented May 16, 2026

Copy link
Copy Markdown
Contributor Author

Current RL CI failure is the same as main CI failure, we can wait for next PyTorch nightly which should contain the fix

@wwwjn
wwwjn requested review from felipemello1 and tianyu-l and removed request for tianyu-l May 16, 2026 01:33
@felipemello1

felipemello1 commented May 16, 2026 •

Copy link
Copy Markdown
Contributor

the error i got was that engine_core doesnt have the method shutdown(). Can you confirm that the error you have is truly because of cleanup_dist_env_and_memory, and not the shutdown method?

@wwwjn

wwwjn commented May 18, 2026

Copy link
Copy Markdown
Contributor Author

the error i got was that engine_core doesnt have the method shutdown().

Is the error you got before this PR or after this PR?

I'm postpone landing this PR and waiting for the CI to turn green. But now we are blocked by https://download.pytorch.org/whl/nightly/vllm/ vllm nightly is not built recently

We intentionally skip ``cleanup_dist_env_and_memory()`` here:
with ``external_launcher``, vLLM reuses the process group that
Monarch created. Destroying it here would prevent Monarch's
``mesh.stop()`` from completing its own collective teardown.

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.

In my observation, the hang happened at this cleanup_dist_env_and_memory step. The script never reached mesh.stop().

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, yes, so the solution is skip cleanup_dist_env_and_memory() , and let mesh.stop() handles shutdown

@wwwjn
wwwjn force-pushed the rl-fix-ci-timeout branch from c3ae492 to 2529730 Compare May 20, 2026 17:41
@wwwjn
wwwjn merged commit 2057b56 into main May 20, 2026
12 of 14 checks passed
saforem2 added a commit to saforem2/torchtitan that referenced this pull request May 20, 2026
Records 8b14712 (2 commits, 52a292d..cfe97c6). Both touch
experiments/rl/ exclusively:

  cfe97c6 — [rl] use wandb=False in CI (pytorch#3408)
  2057b56 — [rl] fix CI timeout: vllm engine V2 teardown (pytorch#3365)

ezpz does not subclass the upstream RL actors, so zero replay needed.
Build state identical to the 35th sync verification.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/rl ciflow/8gpu CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants