Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move pytorch_lightning >> lightning/pytorch #16594

Merged
merged 15 commits into from
Feb 1, 2023
3 changes: 2 additions & 1 deletion .azure/gpu-tests-pytorch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ pr:
- "examples/pl_basics/backbone_image_classifier.py"
- "examples/pl_basics/autoencoder.py"
- "requirements/pytorch/**"
- "src/pytorch_lightning/**"
- "src/lightning/pytorch/**"
- "src/pytorch_lightning/*"
- "tests/tests_pytorch/**"
- "pyproject.toml" # includes pytest config
- "requirements/fabric/**"
Expand Down
3 changes: 2 additions & 1 deletion .azure/hpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ pr:
- "requirements/fabric/**"
- "src/lightning_fabric/**"
- "requirements/pytorch/**"
- "src/pytorch_lightning/**"
- "src/lightning/pytorch/**"
- "src/pytorch_lightning/*"
- "tests/tests_pytorch/**"
- "pyproject.toml" # includes pytest config
exclude:
Expand Down
3 changes: 2 additions & 1 deletion .azure/ipu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ pr:
- "requirements/fabric/**"
- "src/lightning_fabric/**"
- "requirements/pytorch/**"
- "src/pytorch_lightning/**"
- "src/lightning/pytorch/**"
- "src/pytorch_lightning/*"
- "tests/tests_pytorch/**"
- "pyproject.toml" # includes pytest config
exclude:
Expand Down
15 changes: 10 additions & 5 deletions .github/checkgroup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ subprojects:
- "requirements/fabric/**"
- "src/lightning_fabric/**"
- "requirements/pytorch/**"
- "src/pytorch_lightning/**"
- "src/lightning/pytorch/**"
- "src/pytorch_lightning/*"
- "tests/tests_pytorch/**"
- "tests/legacy/**"
- "pyproject.toml" # includes pytest config
Expand Down Expand Up @@ -48,7 +49,8 @@ subprojects:
- "examples/pl_basics/backbone_image_classifier.py"
- "examples/pl_basics/autoencoder.py"
- "requirements/pytorch/**"
- "src/pytorch_lightning/**"
- "src/lightning/pytorch/**"
- "src/pytorch_lightning/*"
- "tests/tests_pytorch/**"
- "pyproject.toml" # includes pytest config
- "requirements/fabric/**"
Expand Down Expand Up @@ -79,7 +81,8 @@ subprojects:
- "requirements/fabric/**"
- "src/lightning_fabric/**"
- "requirements/pytorch/**"
- "src/pytorch_lightning/**"
- "src/lightning/pytorch/**"
- "src/pytorch_lightning/*"
- "tests/tests_pytorch/**"
- "pyproject.toml" # includes pytest config
- "!requirements/*/docs.txt"
Expand All @@ -95,7 +98,8 @@ subprojects:
- "requirements/fabric/**"
- "src/lightning_fabric/**"
- "requirements/pytorch/**"
- "src/pytorch_lightning/**"
- "src/lightning/pytorch/**"
- "src/pytorch_lightning/*"
- "tests/tests_pytorch/**"
- "pyproject.toml" # includes pytest config
- "!requirements/docs.txt"
Expand Down Expand Up @@ -126,7 +130,8 @@ subprojects:

- id: "pytorch_lightning: Docs"
paths:
- "src/pytorch_lightning/**"
- "src/lightning/pytorch/**"
- "src/pytorch_lightning/*"
- "docs/source-pytorch/**"
- ".actions/**"
- ".github/workflows/docs-checks.yml"
Expand Down
3 changes: 2 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ app:
- 'requirements/app/**'

pl:
- 'src/pytorch_lightning/**'
- "src/lightning/pytorch/**"
- "src/pytorch_lightning/*"
- 'tests/tests_pytorch/**'
- 'tests/legacy/**'
- 'examples/pl_*/**'
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ci-tests-pytorch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ on:
paths:
- ".actions/**"
- "requirements/pytorch/**"
- "src/pytorch_lightning/**"
- "src/lightning/pytorch/**"
- "src/pytorch_lightning/*"
- "tests/tests_pytorch/**"
- "tests/legacy/**"
- "pyproject.toml" # includes pytest config
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ on:
- "src/lightning_fabric/**"
- "tests/tests_fabric/**"
- "requirements/pytorch/**"
- "src/pytorch_lightning/**"
- "src/lightning/pytorch/**"
- "src/pytorch_lightning/*"
- "tests/tests_pytorch/**"
- "pyproject.toml" # includes pytest config
- "!requirements/*/docs.txt"
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ src/lightning_app/
!src/lightning_app/MANIFEST.in
!src/lightning_app/README.md
src/lightning/fabric/
src/lightning/pytorch/
src/pytorch_lightning/
!src/pytorch_lightning/__*__.py
!src/pytorch_lightning/MANIFEST.in
!src/pytorch_lightning/README.md

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down
7 changes: 3 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"fabric": "lightning_fabric",
}
# TODO: drop this reverse list when all packages are moved
_MIRROR_PACKAGE_REVERSED = ("app",)
_MIRROR_PACKAGE_REVERSED = ("app", "pytorch")
# https://packaging.python.org/guides/single-sourcing-package-version/
# http://blog.ionelmc.ro/2014/05/25/python-packaging/
_PATH_ROOT = os.path.dirname(__file__)
Expand Down Expand Up @@ -143,9 +143,8 @@ def _set_manifest_path(manifest_dir: str, aggregate: bool = False, mapping: Mapp
if package_to_install == "lightning":
# merge all requirements files
assistant._load_aggregate_requirements(_PATH_REQUIRE, _FREEZE_REQUIREMENTS)
if package_to_install == "lightning" or _PACKAGE_NAME in _MIRROR_PACKAGE_REVERSED: # install everything
# replace imports and copy the code
assistant.create_mirror_package(_PATH_SRC, _PACKAGE_MAPPING, reverse=_MIRROR_PACKAGE_REVERSED)
# replace imports and copy the code
assistant.create_mirror_package(_PATH_SRC, _PACKAGE_MAPPING, reverse=_MIRROR_PACKAGE_REVERSED)
else:
assert len(local_pkgs) > 0
# PL as a package is distributed together with Fabric, so in such case there are more than one candidate
Expand Down
Loading