Skip to content

Require deepspeed>=0.18.6 and drop the 0.16.4 guard - #7118

Merged
albertvillanova merged 1 commit into
mainfrom
bump-deepspeed-floor
Sep 8, 2026
Merged

albertvillanova merged 1 commit into
mainfrom
bump-deepspeed-floor

Conversation

@albertvillanova

@albertvillanova albertvillanova commented Sep 8, 2026 •

Copy link
Copy Markdown
Member

This PR raises the deepspeed floor from 0.14.4 (June 2024) to 0.18.6 (February 2026) and removes the two things that floor was holding in place.

Motivation

The rationale is not new here. #7102, opened by TRL's main maintainer and approved, raises the peft floor on the grounds that a floor should not be older than two years. This applies that same reasoning to the oldest floor we have: deepspeed>=0.14.4 is 26 months old, and it is the only floor already past that window.

Two things go with it:

  • The Version(deepspeed.__version__) >= Version("0.16.4") branch in add_hooks, which chooses between _register_deepspeed_module and the pre-rename _register_hooks_recursively (deepspeed#6847). The local import deepspeed in that function existed only to read __version__, so it goes too.
  • The filterwarnings block for the torch.jit.script and torch.jit.script_method deprecations deepspeed emits. Its comment already records the exit condition: "Remove once: deepspeed >= 0.18.6 is required" (deepspeed#7835, fixed by deepspeed#7840, released in v0.18.6).

The general criterion is under discussion in #7116.

Verification

_register_deepspeed_module is present at the v0.18.6 tag, so the retained call is valid across the whole supported range.

Importing deepspeed 0.18.9 with warnings.simplefilter("always") produces 0 torch.jit.script deprecation warnings, so the removed filter entries match nothing at the new floor. The other side of that check is upstream's record rather than a local run: the filter was added because deepspeed#7835 fired, and deepspeed#7840 fixed it in v0.18.6.

deepspeed is an optional extra, so a default pip install trl is unaffected.

Changes

  • Raise deepspeed>=0.14.4 to >=0.18.6 in the deepspeed extra and in dev
  • Collapse the 0.16.4 branch in add_hooks and drop the now-unused local import deepspeed
  • Remove the deepspeed torch.jit filterwarnings block

Note

Medium Risk
Changes the minimum DeepSpeed version and ZeRO-3 hook registration path for users of the deepspeed extra; impact is limited to optional installs but affects distributed training compatibility.

Overview
Raises the deepspeed optional/dev floor from >=0.14.4 to >=0.18.6, aligning supported DeepSpeed with a newer minimum and upstream fixes (including resolved torch.jit deprecation noise).

In add_hooks, drops the 0.16.4 version branch and always calls _register_deepspeed_module instead of the legacy _register_hooks_recursively path; the function-local import deepspeed used only for version checks is removed.

Removes the pytest filterwarnings entries that suppressed DeepSpeed’s torch.jit.script / torch.jit.script_method deprecations, since those were documented to go away once deepspeed >= 0.18.6 is required.

Reviewed by Cursor Bugbot for commit 1684647. Bugbot is set up for automated code reviews on this repo. Configure here.

@bot-ci-comment

bot-ci-comment Bot commented Sep 8, 2026

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@albertvillanova
albertvillanova merged commit e6a0f81 into main Sep 8, 2026
10 checks passed
@albertvillanova
albertvillanova deleted the bump-deepspeed-floor branch September 8, 2026 14:48
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