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

refresh to lightning v1.8.2 #45

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion config/build-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,17 @@ recipes:
- name : pydeprecate
path : pydeprecate

- name : pytorch-lightning
- name : lightning-utilities
path : lightning-utilities

- name : lightning-cloud
path : lightning-cloud

- name : lightning-api-access
path : lightning-api-access

- name : lightning-app
path : lightning-app

- name : lightning
path : lightning
44 changes: 44 additions & 0 deletions lightning-api-access/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{% set version = "0.0.1" %}

package:
name: lightning-api-access
version: {{ version }}

source:
url: https://files.pythonhosted.org/packages/bf/bf/c3937a5a981a429a66bdd186454d1ecaf311c0337812d6bce2045c817835/lightning_api_access-{{ version }}-py3-none-any.whl
sha256: dd9dd9a2a5b32b563fd6609e6f01c582a41f9a6239d8e6012d7e5ec3c9a286aa

build:
noarch: python
number: 1
script: "python -m pip install lightning_api_access-{{ version }}*.whl --no-deps --ignore-installed -vv "

requirements:
host:
- python
- pip
run:
- python
- lightning {{ pytorch_lightning }}
- fastapi
- websockets
- deepdiff
- lightning-cloud
- uvicorn
- bs4
- croniter

test:
imports:
- lightning_api_access


about:
home: https://github.com/Lightning-AI/LAI-API-Access-UI-Component
license: Apache License 2.0
summary: Lightning API Access UI Component
description: Lightning API Access UI Component

extra:
recipe-maintainers:
- open-ce/open-ce-dev-team
64 changes: 64 additions & 0 deletions lightning-app/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{% set name = "lightning-app" %}
{% set version = "1.8.2" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/Lightning-AI/lightning/releases/download/{{ version }}/{{ name }}-{{ version }}.tar.gz
sha256: 990f9af72cbc79c0f1536486b1abf86aca7dfccbd330ba718f9af61e2c837756

build:
number: 1
noarch: python
string: pyh{{ PKG_HASH }}_{{ PKG_BUILDNUM }}
script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed . -vv

requirements:
host:
- pip {{ pip }}
- python
run:
- packaging
- python
- lightning {{ pytorch_lightning }}
- lightning-utilities
- lightning-cloud
- lightning-api-access
- deepdiff >=5.7.0, <=5.8.1
- croniter >=1.3.0, <1.4.0
- fastapi
- websockets
- click {{ click }}
- requests {{ requests }}
- rich
- fsspec {{ fsspec }}
- uvicorn
- six {{ six }}
- websocket-client
- beautifulsoup4
- starsessions >=1.2.1, <2.0
- s3fs >=2022.5.0, <2022.8.3
- arrow >=1.2.0, <1.2.4
- traitlets >=5.3.0, <=5.4.0
- psutil {{ psutil }}
- inquirer >=2.10.0

test:
imports:
- lightning_app
# commands:
# - pip check

about:
home: https://github.com/Lightning-AI/lightning
summary: Use Lightning Apps to build everything from production-ready, multi-cloud ML systems to simple research demos.
description: Use Lightning Apps to build everything from production-ready, multi-cloud ML systems to simple research demos.
license: Apache-2.0
license_family: Apache
license_file: LICENSE

extra:
recipe-maintainers:
- open-ce/open-ce-dev-team
48 changes: 48 additions & 0 deletions lightning-cloud/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{% set name = "lightning-cloud" %}
{% set version = "0.5.11" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/lightning_cloud-{{ version }}.tar.gz
sha256: 33ca411d8f88dd690ba7af82260e1e27546471954cfa042221781627144288b7

build:
number: 1
noarch: python
string: pyh{{ PKG_HASH }}_{{ PKG_BUILDNUM }}
script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed . -vv

requirements:
host:
- pip {{ pip }}
- python
run:
- python
- click
- requests
- rich
- pyjwt
- fastapi
- six
- websocket-client

test:
imports:
- lightning_cloud
commands:
- pip check

about:
home: https://lightning.ai/
summary: Lightning Cloud.
description: Lightning Cloud.
license: Apache-2.0
license_family: Apache
license_file: LICENSE

extra:
recipe-maintainers:
- open-ce/open-ce-dev-team
42 changes: 42 additions & 0 deletions lightning-utilities/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{% set name = "lightning-utilities" %}
{% set version = "0.3.0" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
sha256: d769ab9b76ebdee3243d1051d509aafee57d7947734ddc22977deef8a6427f2f

build:
number: 1
noarch: python
string: pyh{{ PKG_HASH }}_{{ PKG_BUILDNUM }}
script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed . -vv

requirements:
host:
- pip {{ pip }}
- python
run:
- python
- fire

test:
imports:
- lightning_utilities
commands:
- pip check

about:
home: https://github.com/Lightning-AI/utilities
summary: Lightning Utilities.
description: Lightning Utilities.
license: Apache-2.0
license_family: Apache
license_file: LICENSE

extra:
recipe-maintainers:
- open-ce/open-ce-dev-team
20 changes: 11 additions & 9 deletions lightning/0301-fix-tests.patch
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
diff --git a/requirements/test.txt b/requirements/test.txt
index de749e233..17b84ed22 100644
--- a/requirements/test.txt
+++ b/requirements/test.txt
@@ -11,5 +11,4 @@ pre-commit>=1.0
diff --git a/requirements/pytorch/test.txt b/requirements/pytorch/test.txt
index 5ba99b269..a646c027a 100644
--- a/requirements/pytorch/test.txt
+++ b/requirements/pytorch/test.txt
@@ -9,7 +9,6 @@ pre-commit==2.20.0
# needed in tests
cloudpickle>=1.3
scikit-learn>0.22.1
-onnxruntime
pandas # needed in benchmarks
cloudpickle>=1.3, <=2.1.0
scikit-learn>0.22.1, <1.1.3
-onnxruntime<1.14.0
psutil<5.9.4 # for `DeviceStatsMonitor`
pandas>1.0, <1.5.2 # needed in benchmarks
fastapi<0.87.0
12 changes: 7 additions & 5 deletions lightning/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{% set name = "pytorch-lightning" %}
{% set version = "1.6.5" %}
{% set name = "lightning" %}
{% set version = "1.8.2" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
git_url: https://github.com/PyTorchLightning/pytorch-lightning
git_url: https://github.com/Lightning-AI/lightning
git_rev: {{ version }}

build:
Expand Down Expand Up @@ -34,14 +34,16 @@ requirements:
- fsspec {{ fsspec }}
- torchmetrics {{ torchmetrics }}
- pyDeprecate 0.3.2
- lightning-utilities

test:
imports:
- pytorch_lightning
- lightning
commands:
- pip check

about:
home: https://pypi.org/project/pytorch-lightning/
home: https://github.com/Lightning-AI/lightning
summary: PyTorch Lightning is the lightweight PyTorch wrapper for ML researchers. Scale your models. Write less boilerplate.
description: PyTorch Lightning is the lightweight PyTorch wrapper for ML researchers. Scale your models. Write less boilerplate.
license: Apache-2.0
Expand Down
52 changes: 12 additions & 40 deletions tests/open-ce-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,57 +1,31 @@
tests:
- name: Setup PyTorch-Lightning Tests
command: |
PL_VERSION=$(python -c "import pytorch_lightning; print(pytorch_lightning.__version__)")
PL_VERSION=$(python -c "import lightning; print(lightning.__version__)")
PL_COMMIT=${PL_VERSION#*+}
conda install -y git
git clone https://github.com/PyTorchLightning/pytorch-lightning.git
cd pytorch-lightning
git checkout ${PL_COMMIT}
git apply $FEEDSTOCK_DIR/lightning/0301-fix-tests.patch
git apply $FEEDSTOCK_DIR/lightning/0302-skip-horovod-tests.patch
conda install -y scikit-learn>=0.22.2 numba regex typed-ast pandas scikit-image coverage cryptography
pip install -r requirements/test.txt
conda install -y "scikit-learn>=0.22.2, <1.1.3" regex typed-ast pandas scikit-image coverage cryptography psutil
pip install -r requirements/pytorch/test.txt
pip install sklearn omegaconf rich jsonargparse docstring-parser
- name: Run PyTorch-Lightning tests
command: |
cd pytorch-lightning
SKIPPED_TESTS=(
"not test_gpu_stats_monitor_cpu_machine and"
"not test_amp_gpus and"
"not test_boring_lite_model_single_device and"
"not test_lite_module_forward_conversion and"
"not test_gradient_clipping_by_norm and"
"not test_gradient_clipping_by_value and"
"not test_models and"
"not tests.helpers.datasets.TrialMNIST and"
"not test_optimizers_and_lr_schedulers and"
"not test_ddp_all_dataloaders_passed_to_fit and"
"not test_multiple_optimizers_step and"
"not test_unbalanced_logging_with_multiple_optimizers and"
"not test_proper_refcount and"
"not test_tensor_to_float_conversion and"
"not test_callbacks_restore"
)
TESTSUITES_TO_SKIP=(
tests/models/test_onnx.py
tests/checkpointing/test_legacy_checkpoints.py
tests/trainer/test_dataloaders.py
tests/trainer/test_trainer.py
tests/tuner/test_scale_batch_size.py
tests/trainer/test_trainer_tricks.py
tests/helpers/test_datasets.py
tests/utilities/test_auto_restart.py
tests/strategies/test_common.py
tests/models/test_amp.py
tests/models/test_restore.py
TESTSUITES_TO_RUN=(
tests/tests_pytorch/test_cli.py
tests/tests_pytorch/accelerators
tests/tests_pytorch/trainer/test_trainer.py
tests/tests_pytorch/strategies
)

for skipped_test in "${TESTSUITES_TO_SKIP[@]}"
for test_suite in "${TESTSUITES_TO_RUN[@]}"
do
SKIPPED_TEST_SUITES+="--ignore $skipped_test "
TEST_SUITES+="$test_suite "
done

pytest -k "${SKIPPED_TESTS[*]}" ${SKIPPED_TEST_SUITES} -v tests/
pytest -v ${TEST_SUITES}
- name: Clean tests
command: rm -rf pytorch-lightning
- name: Setup torchmetrics Tests
Expand All @@ -67,7 +41,7 @@ tests:
then
ARCH="64"
fi
conda install -y scikit-learn>=0.22.2 numba regex typed-ast scikit-image nltk gcc_linux-${ARCH} coverage cryptography pandas
conda install -y scikit-learn>=0.22.2 regex typed-ast scikit-image nltk gcc_linux-${ARCH} coverage cryptography pandas
pip install -r requirements/test.txt
pip install torch-fidelity
- name: Run torchmetrics tests
Expand All @@ -78,15 +52,13 @@ tests:
tests/bases/test_aggregation.py
tests/classification/test_accuracy.py
tests/detection/test_map.py
tests/image/test_inception.py
tests/regression/test_r2.py
tests/retrieval/test_ndcg.py
)
for test_suite in "${TESTSUITES_TO_RUN[@]}"
do
TEST_SUITES+="${test_suite} "
done

pytest -v ${TEST_SUITES}
- name: Clean tests
command: rm -rf torchmetrics