Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/lightning/fabric/strategies/deepspeed.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@
_DEEPSPEED_AVAILABLE = (
# DeepSpeed fails under 0.8.2 with torch 2.0: https://github.com/microsoft/DeepSpeed/pull/2863
RequirementCache("deepspeed>=0.8.2")
or not _TORCH_GREATER_EQUAL_2_0
# check packaging because of https://github.com/microsoft/DeepSpeed/pull/2771
# remove the packaging check when min version is >=0.8.1
and RequirementCache("deepspeed")
and RequirementCache("packaging>=20.0")
or (
not _TORCH_GREATER_EQUAL_2_0
and RequirementCache("deepspeed")
# check packaging because of https://github.com/microsoft/DeepSpeed/pull/2771
# remove the packaging check when min version is >=0.8.1
and RequirementCache("packaging>=20.0")
)
)
if TYPE_CHECKING and _DEEPSPEED_AVAILABLE:
import deepspeed
Expand Down