Skip to content

fix: restore standalone GPU trainer launch - #3362

Open
LeonEricsson wants to merge 3 commits into
PrimeIntellect-ai:mainfrom
LeonEricsson:fix/standalone-trainer-init
Open

fix: restore standalone GPU trainer launch #3362
LeonEricsson wants to merge 3 commits into
PrimeIntellect-ai:mainfrom
LeonEricsson:fix/standalone-trainer-init

Conversation

@LeonEricsson

@LeonEricsson LeonEricsson commented Aug 23, 2026

Copy link
Copy Markdown

Summary

background

The README’s environment setup check:

  uv run trainer @ configs/debug/fake/rl.toml

currently fails during distributed initialization due to missing environment variables in os.environ (also noted here. Standalone launches used to work because trainer/envs.py called set_defaults at import time, writing RANK etc into os.environ. #2193 deleted that and inlined os.environ.get("RANK", "0") into World`.

proposal
Rather than reinstate env mutation setup_torch_distributed now passes an in-process HashStore with rank=0, world_size=1 when no launcher is present.

An alternative would be to make the trainer entrypoint a launcher that re-execs under torchrun the way sft and rl already do.

@LeonEricsson
LeonEricsson marked this pull request as ready for review August 23, 2026 12:17
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.

1 participant