Skip to content

Commit

Permalink
remove entry point
Browse files Browse the repository at this point in the history
  • Loading branch information
awaelchli committed Jul 2, 2024
1 parent 84fd1d1 commit 3d67684
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 28 deletions.
16 changes: 0 additions & 16 deletions src/lightning/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,3 @@
"Fabric",
"__version__",
]


def _cli_entry_point() -> None:
from lightning_utilities.core.imports import ModuleAvailableCache, RequirementCache

if not (
ModuleAvailableCache("lightning.app")
if RequirementCache("lightning-utilities<0.10.0")
else RequirementCache(module="lightning.app")
):
print("The `lightning` command requires additional dependencies: `pip install lightning[app]`")
sys.exit(1)

from lightning.app.cli.lightning_cli import main

main()
18 changes: 6 additions & 12 deletions src/lightning/fabric/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,12 @@ def _legacy_main() -> None:
"""
hparams = sys.argv[1:]
if len(hparams) >= 2 and hparams[0] == "run":
if hparams[1] == "model":
print(
"`lightning run model` is deprecated and will be removed in future versions."
" Please call `fabric run` instead."
)
_main()
return

from lightning.app.cli.lightning_cli import main as main_cli

main_cli()
if len(hparams) >= 2 and hparams[0] == "run" and hparams[1] == "model":
print(
"`lightning run model` is deprecated and will be removed in future versions."
" Please call `fabric run` instead."
)
_main()
return

if _LIGHTNING_SDK_AVAILABLE:
Expand Down

0 comments on commit 3d67684

Please sign in to comment.