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

Installing Lite also installs PyTorch Lightning #15490

Closed
carmocca opened this issue Nov 3, 2022 · 1 comment
Closed

Installing Lite also installs PyTorch Lightning #15490

carmocca opened this issue Nov 3, 2022 · 1 comment
Assignees
Labels
ci Continuous Integration
Milestone

Comments

@carmocca
Copy link
Contributor

carmocca commented Nov 3, 2022

Proposed refactor

See title

Motivation

$ python -c "import pytorch_lightning"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pytorch_lightning'

$ PACKAGE_NAME=lite pip install -e .
...
Successfully installed lightning-lite-1.8.0.post1

$ python -c "import pytorch_lightning"
$ echo $?
0

Pitch

PL should not be included.


If you enjoy Lightning, check out our other projects! ⚡

  • Metrics: Machine learning metrics for distributed, scalable PyTorch applications.

  • Lite: enables pure PyTorch users to scale their existing code on any kind of device while retaining full control over their own loops and optimization logic.

  • Flash: The fastest way to get a Lightning baseline! A collection of tasks for fast prototyping, baselining, fine-tuning, and solving problems with deep learning.

  • Bolts: Pretrained SOTA Deep Learning models, callbacks, and more for research and production with PyTorch Lightning and PyTorch.

  • Lightning Transformers: Flexible interface for high-performance research using SOTA Transformers leveraging PyTorch Lightning, Transformers, and Hydra.

cc @carmocca @akihironitta @Borda

@carmocca carmocca added the ci Continuous Integration label Nov 3, 2022
@carmocca carmocca added this to the v1.8.x milestone Nov 3, 2022
@carmocca
Copy link
Contributor Author

carmocca commented Nov 5, 2022

This is caused by using -e. When it's used, lightning/src is added to sys.path:

$ python -m site
sys.path = [
    ...,
    '/home/carmocca/git/lightning/src',
]

And since that directory contains the other packages, they become importable.

This is not only with Lite, also when any of them is installed with editable mode.

@carmocca carmocca closed this as completed Nov 5, 2022
@carmocca carmocca self-assigned this Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continuous Integration
Projects
None yet
Development

No branches or pull requests

1 participant