-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
pl.utilities.cli
module (#16116)
- Loading branch information
Showing
14 changed files
with
95 additions
and
220 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
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
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,45 @@ | ||
import sys | ||
from typing import Any | ||
|
||
|
||
def _patch_sys_modules() -> None: | ||
# TODO: Remove in v2.0.0 | ||
self = sys.modules[__name__] | ||
sys.modules["pytorch_lightning.utilities.cli"] = self | ||
|
||
|
||
class LightningCLI: | ||
# TODO: Remove in v2.0.0 | ||
def __init__(self, *_: Any, **__: Any) -> None: | ||
raise NotImplementedError( | ||
"`pytorch_lightning.utilities.cli.LightningCLI` was deprecated in v1.7.0 and is no" | ||
" longer supported as of v1.9.0. Please use `pytorch_lightning.cli.LightningCLI` instead" | ||
) | ||
|
||
|
||
class SaveConfigCallback: | ||
# TODO: Remove in v2.0.0 | ||
def __init__(self, *_: Any, **__: Any) -> None: | ||
raise NotImplementedError( | ||
"`pytorch_lightning.utilities.cli.SaveConfigCallback` was deprecated in v1.7.0 and is no" | ||
" longer supported as of v1.9.0. Please use `pytorch_lightning.cli.SaveConfigCallback` instead" | ||
) | ||
|
||
|
||
class LightningArgumentParser: | ||
# TODO: Remove in v2.0.0 | ||
def __init__(self, *_: Any, **__: Any) -> None: | ||
raise NotImplementedError( | ||
"`pytorch_lightning.utilities.cli.LightningArgumentParser` was deprecated in v1.7.0 and is no" | ||
" longer supported as of v1.9.0. Please use `pytorch_lightning.cli.LightningArgumentParser` instead" | ||
) | ||
|
||
|
||
def instantiate_class(*_: Any, **__: Any) -> None: | ||
raise NotImplementedError( | ||
"`pytorch_lightning.utilities.cli.instantiate_class` was deprecated in v1.7.0 and is no" | ||
" longer supported as of v1.9.0. Please use `pytorch_lightning.cli.instantiate_class` instead" | ||
) | ||
|
||
|
||
_patch_sys_modules() |
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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.