Skip to content

Commit

Permalink
Add LightningLite to top level imports (#15502)
Browse files Browse the repository at this point in the history
Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
(cherry picked from commit c32c435)
  • Loading branch information
awaelchli authored and Borda committed Nov 16, 2022
1 parent 733ec55 commit 067bb4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci-pkg-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ jobs:
run: python -m lightning --version

- name: DocTest package
env:
PY_IGNORE_IMPORTMISMATCH: 1
run: |
PKG_NAME=$(python -c "print({'app': 'lightning_app', 'lite': 'lightning_lite', 'pytorch': 'pytorch_lightning', 'lightning': 'lightning'}['${{matrix.pkg-name}}'])")
python -m pytest src/${PKG_NAME} --ignore-glob="**/cli/*-template/**"
2 changes: 2 additions & 0 deletions src/lightning/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def _detail(self: Any, message: str, *args: Any, **kwargs: Any) -> None:
from lightning.app.perf import pdb # noqa: E402
from lightning.app.utilities.packaging.build_config import BuildConfig # noqa: E402
from lightning.app.utilities.packaging.cloud_compute import CloudCompute # noqa: E402
from lightning.lite.lite import LightningLite # noqa: E402
from lightning.pytorch.callbacks import Callback # noqa: E402
from lightning.pytorch.core import LightningDataModule, LightningModule # noqa: E402
from lightning.pytorch.trainer import Trainer # noqa: E402
Expand All @@ -59,6 +60,7 @@ def _detail(self: Any, message: str, *args: Any, **kwargs: Any) -> None:
"LightningModule",
"Callback",
"seed_everything",
"LightningLite",
"storage",
"pdb",
]

0 comments on commit 067bb4e

Please sign in to comment.