Skip to content

Commit

Permalink
Remove the lightning app code (#20039)
Browse files Browse the repository at this point in the history
* remove source, tests, docs, workflows

* update checkgroup

* update codeowners

* update workflows

* package setup

* config files

* update

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove entry point

* docs

* __main__

* remove store

* leftover store removals

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
awaelchli and pre-commit-ci[bot] committed Jul 5, 2024
1 parent 90f23b3 commit 330af38
Show file tree
Hide file tree
Showing 898 changed files with 25 additions and 73,832 deletions.
33 changes: 1 addition & 32 deletions .actions/assistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@
import glob
import logging
import os
import pathlib
import re
import shutil
import tarfile
import tempfile
import urllib.request
from distutils.version import LooseVersion
Expand All @@ -35,11 +33,6 @@
"requirements/pytorch/strategies.txt",
"requirements/pytorch/examples.txt",
),
"app": (
"requirements/app/app.txt",
"requirements/app/cloud.txt",
"requirements/app/ui.txt",
),
"fabric": (
"requirements/fabric/base.txt",
"requirements/fabric/strategies.txt",
Expand Down Expand Up @@ -216,30 +209,6 @@ def distribute_version(src_folder: str, ver_file: str = "version.info") -> None:
shutil.copy2(ver_template, fpath)


def _download_frontend(pkg_path: str, version: str = "v0.0.0"):
"""Downloads an archive file for a specific release of the Lightning frontend and extracts it to the correct
directory."""

try:
frontend_dir = pathlib.Path(pkg_path, "ui")
download_dir = tempfile.mkdtemp()

shutil.rmtree(frontend_dir, ignore_errors=True)
# TODO: remove this once lightning-ui package is ready as a dependency
frontend_release_url = f"https://lightning-packages.s3.amazonaws.com/ui/{version}.tar.gz"
response = urllib.request.urlopen(frontend_release_url)

file = tarfile.open(fileobj=response, mode="r|gz")
file.extractall(path=download_dir) # noqa: S202

shutil.move(download_dir, frontend_dir)
print("The Lightning UI has successfully been downloaded!")

# If installing from source without internet connection, we don't want to break the installation
except Exception:
print("The Lightning UI downloading has failed!")


def _load_aggregate_requirements(req_dir: str = "requirements", freeze_requirements: bool = False) -> None:
"""Load all base requirements from all particular packages and prune duplicates.
Expand Down Expand Up @@ -466,7 +435,7 @@ def pull_docs_files(
raise RuntimeError(f"Requesting file '{zip_url}' does not exist or it is just unavailable.")

with zipfile.ZipFile(zip_file, "r") as zip_ref:
zip_ref.extractall(tmp) # noqa: S202
zip_ref.extractall(tmp)

zip_dirs = [d for d in glob.glob(os.path.join(tmp, "*")) if os.path.isdir(d)]
# check that the extracted archive has only repo folder
Expand Down
206 changes: 0 additions & 206 deletions .azure/app-cloud-e2e.yml

This file was deleted.

10 changes: 0 additions & 10 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
/.actions/ @borda @ethanwharris @justusschock
/.github/ @borda @ethanwharris @justusschock
/.azure/ @borda @ethanwharris @justusschock
/.azure/app-cloud-e2e.yml @awaelchli @ethanwharris @lantiga
/dockers/ @borda @ethanwharris @justusschock
*.yml @borda @ethanwharris @justusschock

Expand All @@ -25,7 +24,6 @@
/docs/source-pytorch/conf.py @borda @awaelchli
/docs/source-pytorch/index.rst @williamfalcon @lantiga
/docs/source-pytorch/levels @williamfalcon @lantiga
/docs/source-app/ @williamfalcon @lantiga @tchaton

# PyTorch Lightning
/src/lightning/pytorch @lantiga @borda @tchaton @awaelchli @justusschock
Expand All @@ -36,18 +34,10 @@
# Lightning Fabric
/src/lightning/fabric @lantiga @borda @tchaton @awaelchli @justusschock

# Lightning App
/src/lightning/app @tchaton @lantiga @awaelchli @ethanwharris
/src/lightning_app @tchaton @lantiga @awaelchli @ethanwharris
/tests/tests_app @tchaton @lantiga @awaelchli @ethanwharris
/tests/integrations_app @tchaton @lantiga @awaelchli @ethanwharris
/examples/app_* @tchaton @lantiga @awaelchli @ethanwharris

/.github/CODEOWNERS @williamfalcon
/SECURITY.md @williamfalcon @lantiga
/README.md @williamfalcon @lantiga
/setup.py @williamfalcon @borda
/src/pytorch_lightning/__about__.py @williamfalcon @borda
/src/lightning_app/__about__.py @williamfalcon @lantiga @borda
/src/lightning_fabric/__about__.py @williamfalcon @borda @awaelchli
/src/*/__setup__.py @borda @justusschock
14 changes: 0 additions & 14 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,20 +310,6 @@ and the last true master commit is `ccc111` and your first commit is `mmm222`.
git push -f
```

#### How to run an app on the cloud with a local version of lightning

The lightning cloud uses the latest release by default. However, you might want to run your app with some local changes you've made to the lightning framework. To use your local version of lightning on the cloud, set the following environment variable:

```bash
git clone https://github.com/Lightning-AI/lightning.git
cd lightning
pip install -e .
export PACKAGE_LIGHTNING=1 # <- this is the magic to use your version (not mainstream PyPI)!
lightning run app app.py --cloud
```

By setting `PACKAGE_LIGHTNING=1`, lightning packages the lightning source code in your local directory in addition to your app source code and uploads them to the cloud.

### Bonus Workflow Tip

If you don't want to remember all the commands above every time you want to push some code/setup a Lightning Dev environment on a new VM, you can set up bash aliases for some common commands. You can add these to one of your `~/.bashrc`, `~/.zshrc`, or `~/.bash_aliases` files.
Expand Down
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/1_bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@ body:
<summary>Current environment</summary>
```
#- Lightning Component (e.g. Trainer, LightningModule, LightningApp, LightningWork, LightningFlow):
#- PyTorch Lightning Version (e.g., 1.5.0):
#- Lightning App Version (e.g., 0.5.2):
#- PyTorch Version (e.g., 2.0):
#- Python version (e.g., 3.9):
#- OS (e.g., Linux):
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/pkg-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ runs:
run: |
import os, glob
lut = {'app': 'lightning_app', 'fabric': 'lightning_fabric', 'pytorch': 'pytorch_lightning'}
lut = {'fabric': 'lightning_fabric', 'pytorch': 'pytorch_lightning'}
act_pkg = lut.get('${{inputs.pkg-name}}', 'lightning')
pkg_sdist = glob.glob('*.tar.gz')[0]
pkg_wheel = glob.glob('*.whl')[0]
Expand Down
38 changes: 0 additions & 38 deletions .github/actions/prep-apps/action.yml

This file was deleted.

Loading

0 comments on commit 330af38

Please sign in to comment.