-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove the deprecated
LightningDeepSpeedModule
(#16041)
- Loading branch information
Showing
7 changed files
with
29 additions
and
51 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from typing import Any | ||
|
||
import pytorch_lightning.strategies.deepspeed as deepspeed | ||
|
||
|
||
class _LightningDeepSpeedModule: | ||
# TODO: Remove in v2.0.0 | ||
def __init__(self, *_: Any, **__: Any) -> None: | ||
raise RuntimeError( | ||
"`pytorch_lightning.strategies.deepspeed.LightningDeepSpeedModule` was deprecated in v1.7.1 and is no" | ||
" longer supported as of v1.9.0." | ||
) | ||
|
||
|
||
deepspeed.LightningDeepSpeedModule = _LightningDeepSpeedModule |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import pytest | ||
|
||
|
||
def test_v2_0_0_lightningdeepspeedmodule(): | ||
from pytorch_lightning.strategies.deepspeed import LightningDeepSpeedModule | ||
|
||
with pytest.raises(RuntimeError, match="LightningDeepSpeedModule` was deprecated in v1.7.1"): | ||
LightningDeepSpeedModule() |
This file contains 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