Repository navigation
Require deepspeed>=0.18.6 and drop the 0.16.4 guard - #7118
Merged
Merged
Conversation
|
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. |
qgallouedec
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.4is 26 months old, and it is the only floor already past that window.Two things go with it:
Version(deepspeed.__version__) >= Version("0.16.4")branch inadd_hooks, which chooses between_register_deepspeed_moduleand the pre-rename_register_hooks_recursively(deepspeed#6847). The localimport deepspeedin that function existed only to read__version__, so it goes too.filterwarningsblock for thetorch.jit.scriptandtorch.jit.script_methoddeprecations 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_moduleis 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 0torch.jit.scriptdeprecation 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 trlis unaffected.Changes
deepspeed>=0.14.4to>=0.18.6in thedeepspeedextra and indevadd_hooksand drop the now-unused localimport deepspeedtorch.jitfilterwarningsblockNote
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.4to>=0.18.6, aligning supported DeepSpeed with a newer minimum and upstream fixes (including resolvedtorch.jitdeprecation noise).In
add_hooks, drops the0.16.4version branch and always calls_register_deepspeed_moduleinstead of the legacy_register_hooks_recursivelypath; the function-localimport deepspeedused only for version checks is removed.Removes the pytest
filterwarningsentries that suppressed DeepSpeed’storch.jit.script/torch.jit.script_methoddeprecations, since those were documented to go away oncedeepspeed >= 0.18.6is required.Reviewed by Cursor Bugbot for commit 1684647. Bugbot is set up for automated code reviews on this repo. Configure here.