-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Add lightning #22249
Add lightning #22249
Conversation
Use Lightning Apps to build everything from production-ready, multi-cloud ML systems to simple research demos! Repo at https://github.com/Lightning-AI/lightning
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( I do have some suggestions for making it better though... For recipes/lightning:
|
Discussion at https://github.com/orgs/conda-forge/teams/bioconda-recipes/discussions/15 |
Build failing at https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=671385&view=logs&j=6f142865-96c3-535c-b7ea-873d86b887bd&t=22b0682d-ab9e-55d7-9c79-49f3c3ba4823&l=3700 as follows: export PREFIX=/home/conda/staged-recipes/build_artifacts/lightning_1678550325764/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh
export SRC_DIR=/home/conda/staged-recipes/build_artifacts/lightning_1678550325764/test_tmp
import: 'lightning'
Traceback (most recent call last):
File "/home/conda/staged-recipes/build_artifacts/lightning_1678550325764/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.11/site-packages/lightning/pytorch/strategies/bagua.py", line 29, in <module>
from lightning.pytorch.plugins.precision import PrecisionPlugin
File "/home/conda/staged-recipes/build_artifacts/lightning_1678550325764/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.11/site-packages/lightning/pytorch/plugins/__init__.py", line 7, in <module>
from lightning.pytorch.plugins.precision.apex_amp import ApexMixedPrecisionPlugin
File "/home/conda/staged-recipes/build_artifacts/lightning_1678550325764/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.11/site-packages/lightning/pytorch/plugins/precision/__init__.py", line 18, in <module>
from lightning.pytorch.plugins.precision.fsdp_native_native_amp import FullyShardedNativeNativeMixedPrecisionPlugin
File "/home/conda/staged-recipes/build_artifacts/lightning_1678550325764/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.11/site-packages/lightning/pytorch/plugins/precision/fsdp_native_native_amp.py", line 24, in <module>
from torch.distributed.fsdp.fully_sharded_data_parallel import MixedPrecision
File "/home/conda/staged-recipes/build_artifacts/lightning_1678550325764/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.11/site-packages/torch/distributed/fsdp/__init__.py", line 1, in <module>
from .flat_param import FlatParameter
File "/home/conda/staged-recipes/build_artifacts/lightning_1678550325764/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.11/site-packages/torch/distributed/fsdp/flat_param.py", line 26, in <module>
from ._fsdp_extensions import _ext_post_unflatten_transform, _ext_pre_flatten_transform
File "/home/conda/staged-recipes/build_artifacts/lightning_1678550325764/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.11/site-packages/torch/distributed/fsdp/_fsdp_extensions.py", line 7, in <module>
from torch.distributed.fsdp._shard_utils import _create_chunk_sharded_tensor
File "/home/conda/staged-recipes/build_artifacts/lightning_1678550325764/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.11/site-packages/torch/distributed/fsdp/_shard_utils.py", line 10, in <module>
from torch.distributed._shard.sharded_tensor import (
File "/home/conda/staged-recipes/build_artifacts/lightning_1678550325764/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.11/site-packages/torch/distributed/_shard/__init__.py", line 1, in <module>
from .api import (
File "/home/conda/staged-recipes/build_artifacts/lightning_1678550325764/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.11/site-packages/torch/distributed/_shard/api.py", line 6, in <module>
from torch.distributed._shard.sharded_tensor import (
File "/home/conda/staged-recipes/build_artifacts/lightning_1678550325764/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.11/site-packages/torch/distributed/_shard/sharded_tensor/__init__.py", line 8, in <module>
import torch.distributed._shard.sharding_spec as shard_spec
File "/home/conda/staged-recipes/build_artifacts/lightning_1678550325764/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.11/site-packages/torch/distributed/_shard/sharding_spec/__init__.py", line 1, in <module>
from .api import (
File "/home/conda/staged-recipes/build_artifacts/lightning_1678550325764/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.11/site-packages/torch/distributed/_shard/sharding_spec/api.py", line 16, in <module>
import torch.distributed._shard.sharded_tensor.metadata as sharded_tensor_meta
File "/home/conda/staged-recipes/build_artifacts/lightning_1678550325764/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.11/site-packages/torch/distributed/_shard/sharded_tensor/metadata.py", line 70, in <module>
@dataclass
^^^^^^^^^
File "/home/conda/staged-recipes/build_artifacts/lightning_1678550325764/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.11/dataclasses.py", line 1221, in dataclass
return wrap(cls)
^^^^^^^^^
File "/home/conda/staged-recipes/build_artifacts/lightning_1678550325764/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.11/dataclasses.py", line 1211, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/conda/staged-recipes/build_artifacts/lightning_1678550325764/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.11/dataclasses.py", line 959, in _process_class
cls_fields.append(_get_field(cls, name, type, kw_only))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/conda/staged-recipes/build_artifacts/lightning_1678550325764/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/python3.11/dataclasses.py", line 816, in _get_field
raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'torch.distributed._shard.sharded_tensor.metadata.TensorProperties'> for field tensor_properties is not allowed: use default_factory
Tests failed for lightning-1.9.4-pyhd8ed1ab_0.conda - moving package to /home/conda/staged-recipes/build_artifacts/broken
WARNING:conda_build.build:Tests failed for lightning-1.9.4-pyhd8ed1ab_0.conda - moving package to /home/conda/staged-recipes/build_artifacts/broken
TESTS FAILED: lightning-1.9.4-pyhd8ed1ab_0.conda
##[error]Bash exited with code '1'. The error looks like Lightning-AI/pytorch-lightning#15614 and is because of building on Python 3.11 (which is not officially supported by Pytorch < 2.0 yet). Can try the suggestion at conda-forge/pytorch-lightning-feedstock#107 (comment) to put an upper bound on python of |
Due to Pytorch<2.0 not supporting dataclass properly yet. Xref conda-forge/pytorch-lightning-feedstock#107 (comment).
Needed to fix `RuntimeError: Form data requires "python-multipart" to be installed` when running `lightning --help`.
Windows build failing due to |
@conda-forge/help-python, ready for review! |
Is this the successor to https://github.com/conda-forge/pytorch-lightning-feedstock? If so, should there be some coordination with the maintainers of that feedstock? |
No, |
When I look at https://github.com/Lightning-AI/lightning, it says: "NEWS: PyTorch Lightning has been renamed Lightning!" and there are commits like https://github.com/Lightning-AI/lightning/pull/17074/files, which seem to indicate that pytorch lightning is just being renamed. I just want to suggest coordinating with the other feedstock maintainers, especially since one of them is the creator of pytorch lightning. |
Oo ok, that's news to me too. So apparently they might be deprecating pytorch-lightning for lightning in June 2023? Maybe it is worth checking... Cc @Borda? Edit: Saw the news article at https://lightning.ai/pages/community/lightning-releases/pytorch-lightning-2-0. Changing this to draft for now. |
this was updated and we do not have any plan for depreciation PL at this moment, so both will live :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's start with 2.0
Co-authored-by: Jirka Borovec <[email protected]>
Set minimum python version to 3.8 and so on.
Similar to 019c0ee, but just setting python<3.11 on test/requires.
Needed to fix `RuntimeError: Form data requires "python-multipart" to be installed` when running `lightning --help`.
Thanks for the clarification. In that case, this should be ready for review again @synapticarbors, cc @conda-forge/help-python. I've updated the version from 1.9.4 to 2.0.0 now. |
Gentle ping again @conda-forge/help-python. CI test failure on Windows is due to missing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recipe looks good. Just need confirmation from @lantiga that they are willing to be listed as a maintainer for this recipe.
This is timing out on the build, was this a problem previously? |
Hmm, the build itself seems to be fine, but it is timing out on the
I've re-triggered the CI build, let's see if it was just randomly stuck. Also removed @lantiga for now since he hasn't responded, we can add him back later. |
recipes/lightning/meta.yaml
Outdated
- lightning | ||
commands: | ||
- pip check | ||
- lightning --help |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is timing out on the build, was this a problem previously?
Ok, after building and installing lightning==2.0.0
locally and running lightning --help
, there is a prompt that requires user input:
A newer version of lightning is available (2.0.1). Would you like to upgrade? [Y/n]:
This is caused by https://github.com/Lightning-AI/lightning/blob/2.0.0/src/lightning/app/cli/lightning_cli.py#L84. Need to find a way to disable this prompt on the CLI, otherwise it'll block the build from completing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using LIGHTING_TESTING=1 lightning --help
in 4661300 worked. @dopplershift, should be ok to merge now!
Silences the `A newer version of lightning is available` user prompt that stops the build from completing on the command-line. Xref https://github.com/Lightning-AI/lightning/blob/2.0.0/src/lightning/app/cli/lightning_cli.py#L76-L84
Use Lightning Apps to build everything from production-ready, multi-cloud ML systems to simple research demos! Repo at https://github.com/Lightning-AI/lightning
Xref previous attempts at #19716 and #19715. Requires #22247.
Checklist
url
) rather than a repo (e.g.git_url
) is used in your recipe (see here for more details).