Skip to content

Expose save_async and the distributed timeout - #1821

Merged
abhishekraok merged 6 commits into
mainfrom
pr/save-async-and-dist-timeout
Aug 20, 2026
Merged

abhishekraok merged 6 commits into
mainfrom
pr/save-async-and-dist-timeout

Conversation

@abhishekraok

@abhishekraok abhishekraok commented Aug 14, 2026 •

Copy link
Copy Markdown
Collaborator

Both were hardcoded. Defaults are unchanged.

--dist_timeout_hours (was a hardcoded 24). The long timeout exists so ranks can wait at a barrier while rank 0 tokenizes, which can legitimately take hours — but it then covers the whole run, so a mid-training stall also gets 24 hours to do nothing. One such stall held 8 GPUs for 2h40m before anyone noticed. With a pre-built cache (the two-job workflow) a couple of hours is plenty, and a hang becomes a prompt, diagnosable crash.

This flag is what produced the stack trace in allenai/Olmo-core#829 — with the 24h default the job just goes quiet.

--save_async (was hardcoded True). Async saving keeps training moving while a ~100 GB checkpoint is written, but puts the write on a background thread whose failures are harder to attribute. Being able to force synchronous saves is what ruled checkpointing out as the cause of that hang.

Runs:

  1. Single-GPU SFT with --dist_timeout_hours 2 --save_async false — process group init logs timeout=datetime.timedelta(seconds=7200), and checkpoint metrics switch from save_async_duration_s to save_duration_s (synchronous saves); trains 46 steps to completion: Beaker

abhishekraok added a commit that referenced this pull request Aug 14, 2026
@abhishekraok
abhishekraok force-pushed the pr/save-async-and-dist-timeout branch from 10ca2b7 to 095d079 Compare August 14, 2026 21:14
abhishekraok added a commit that referenced this pull request Aug 14, 2026
@abhishekraok
abhishekraok force-pushed the pr/save-async-and-dist-timeout branch from 095d079 to e843409 Compare August 14, 2026 22:47
@abhishekraok
abhishekraok requested review from farhatkevin and removed request for farhatkevin August 18, 2026 18:53
@abhishekraok
abhishekraok marked this pull request as ready for review August 18, 2026 18:53
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@abhishekraok
abhishekraok changed the base branch from pr/hf-export-weight-naming to main August 18, 2026 18:58
abhishekraok and others added 3 commits August 18, 2026 13:01
Both were hardcoded. A 1-node Olmo-Hybrid-7B run went silent at step 580,
~15 min after an async checkpoint save, with no traceback; because the
process group is built with the 24h tokenize-barrier timeout, nothing
aborted it and it held 8 GPUs for 2h40m.

The long timeout exists so ranks can wait while rank 0 tokenizes, but it
then covers the whole run. With a pre-built cache (the two-job workflow)
a couple of hours is plenty and a hang becomes a prompt crash.

Defaults are unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01EfGd3gqhva8Stpgf4os7sn
@abhishekraok
abhishekraok force-pushed the pr/save-async-and-dist-timeout branch from bdd8557 to 075b997 Compare August 18, 2026 20:01
@farhatkevin

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cc895356f1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread open_instruct/olmo_core_utils.py Resolved
Comment thread open_instruct/olmo_core_utils.py Resolved
claude and others added 2 commits August 19, 2026 21:53
DPOTrainingConfig and GRPOExperimentConfig inherit TrainingConfig and
CheckpointConfig, so putting the fields there advertised --dist_timeout_hours
and --save_async on the DPO and GRPO CLIs, where nothing reads them: dpo.py
calls setup_distributed_env with no timeout and passes save_async=False
literally, and grpo_olmo_core_actor.py uses backend_timeout and omits
save_async. Move both to an SFT-only config instead.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Rxjgqq2et4AXi4tEPVRG9h

@farhatkevin farhatkevin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@abhishekraok
abhishekraok added this pull request to the merge queue Aug 20, 2026
Merged via the queue into main with commit 2809499 Aug 20, 2026
7 checks passed
@abhishekraok
abhishekraok deleted the pr/save-async-and-dist-timeout branch August 20, 2026 17:30
abhishekraok added a commit that referenced this pull request Aug 20, 2026
#1821 has landed, so the flag the header asked for exists. 2h is safe only
because the tokenize job runs first: on a cold cache the non-zero ranks wait
at a barrier while rank 0 tokenizes, which outlasts it. Say so, since the
number is otherwise indistinguishable from a guess.

Co-Authored-By: Claude Fable 5 <[email protected]>
abhishekraok added a commit that referenced this pull request Oct 27, 2026
…elaunched long runs

Defaults are unchanged (sync saves, 1024-step ephemeral interval). --no_save_async was a
debugging leftover from #1821; the hang it chased was OLMo-core #829 (FSDP reduce-scatter on GDN).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SPqiwLhZFL7C3CfKtc95Un
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.

3 participants