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

releasing 1.8.5 #16051

Merged
merged 22 commits into from
Dec 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
2c41a55
update chlog
Borda Dec 14, 2022
23ca3ad
CI: Add remote fetch (#16001)
tchaton Dec 10, 2022
f01e4fc
Set the logger explicitly in tests (#15815)
carmocca Dec 10, 2022
ed223e8
[App] Fix `AutoScaler` trying to replicate multiple works in a single…
akihironitta Dec 11, 2022
fb7f473
Fix typo in PR titles generated by github-actions bot (#16003)
awaelchli Dec 11, 2022
ee50213
Update docker requirement from <=5.0.3,>=5.0.0 to >=5.0.0,<6.0.2 in /…
dependabot[bot] Dec 12, 2022
b8e5b34
Update deepdiff requirement from <=5.8.1,>=5.7.0 to >=5.7.0,<6.2.3 in…
dependabot[bot] Dec 12, 2022
6fddd82
app: update doctest_skip (#15997)
Borda Dec 12, 2022
dc96640
CI: clean install & share pkg build (#15986)
Borda Dec 13, 2022
41bfb4f
Adding hint to the logger's error messages (#16034)
Al3xDo Dec 14, 2022
5b11bdd
fix publish
Borda Dec 14, 2022
1438255
Introduce `{Work,Flow}.lightningignore` (#15818)
carmocca Dec 13, 2022
05a8d54
[App] Support running on multiple clusters (#16016)
ethanwharris Dec 14, 2022
4debdd3
[App] Improve lightning connect experience (#16035)
tchaton Dec 14, 2022
e47d7d0
Cleanup cluster waiting (#16054)
luca3rd Dec 14, 2022
415aa4d
feature(cli): login flow fixes and improvements (#16052)
yurijmikhalevich Dec 14, 2022
c720d63
Add guards to cluster deletion from cli (#16053)
luca3rd Dec 14, 2022
55664de
Load app before setting LIGHTNING_DISPATCHED (#16057)
carmocca Dec 14, 2022
806d035
[App] Hot fix: Resolve detection of python debugger (#16068)
tchaton Dec 15, 2022
d4978b4
fix(cloud): detect and ignore venv (#16056)
yurijmikhalevich Dec 15, 2022
b53b09c
version 1.8.5
lantiga Dec 7, 2022
fb9a09b
update chlog
Borda Dec 15, 2022
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
1 change: 0 additions & 1 deletion .github/actions/pkg-check/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ inputs:
pkg-name:
description: package name inside lightning.*
required: true
default: ""
nb-dirs:
description: nb of packages in the wrap/distribution
required: false
Expand Down
21 changes: 14 additions & 7 deletions .github/actions/pkg-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Install and validate the package
description: Install and validate the package

inputs:
pkg-folder:
description: Define folder with packages
required: true
pkg-name:
description: Package name to import
required: true
Expand All @@ -14,22 +17,26 @@ runs:
using: "composite"
steps:
- name: Choose package import
working-directory: ${{ inputs.pkg-folder }}
run: |
python -c "print('PKG_IMPORT=' + {'app': 'lightning_app', 'lite': 'lightning_lite', 'pytorch': 'pytorch_lightning', 'lightning': 'lightning'}['${{matrix.pkg-name}}'])" >> $GITHUB_ENV
ls -l
python -c "print('PKG_IMPORT=' + {'app': 'lightning_app', 'lite': 'lightning_lite', 'pytorch': 'pytorch_lightning'}.get('${{matrix.pkg-name}}', 'lightning'))" >> $GITHUB_ENV
python -c "import glob ; ls = glob.glob('*.tar.gz') ; print('PKG_SOURCE=' + ls[0])" >> $GITHUB_ENV
python -c "import glob ; ls = glob.glob('*.whl') ; print('PKG_WHEEL=' + ls[0])" >> $GITHUB_ENV
shell: bash

- name: Install package - archive
working-directory: ./dist
- name: Install package - wheel
working-directory: ${{ inputs.pkg-folder }}
run: |
pip install *.tar.gz ${{ inputs.pip-flags }}
pip install ${PKG_WHEEL} ${{ inputs.pip-flags }}
pip list | grep lightning
python -c "import ${{ env.PKG_IMPORT }}; print(${{ env.PKG_IMPORT }}.__version__)"
shell: bash

- name: Install package - wheel
working-directory: ./dist
- name: Install package - archive
working-directory: ${{ inputs.pkg-folder }}
run: |
pip install *.whl ${{ inputs.pip-flags }}
pip install ${PKG_SOURCE} ${{ inputs.pip-flags }}
pip list | grep lightning
python -c "import ${{ env.PKG_IMPORT }}; print(${{ env.PKG_IMPORT }}.__version__)"
shell: bash
17 changes: 5 additions & 12 deletions .github/actions/pkg-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Publish package
description: publishing whl and src to PyPI

inputs:
pkg-pattern:
description: what file pattern is searched in folder, so for example `*_app*`
pkg-folder:
description: define folder with packages
required: true
pypi-test-token:
description: login token for PyPI
Expand All @@ -18,10 +18,7 @@ runs:
using: "composite"
steps:

- name: filter packages
run: |
mv dist/${{ inputs.pkg-pattern }} pypi/
ls -l pypi/
- run: ls -lh ${{ inputs.pkg-folder }}
shell: bash

# We do this, since failures on test.pypi aren't that bad
Expand All @@ -32,7 +29,7 @@ runs:
user: __token__
password: ${{ inputs.pypi-test-token }}
repository_url: https://test.pypi.org/legacy/
packages_dir: pypi/
packages_dir: ${{ inputs.pkg-folder }}
verbose: true

- name: Publish distribution 📦 to PyPI
Expand All @@ -41,9 +38,5 @@ runs:
with:
user: __token__
password: ${{ inputs.pypi-token }}
packages_dir: pypi/
packages_dir: ${{ inputs.pkg-folder }}
verbose: true

- name: filter packages
run: rm pypi/*
shell: bash
3 changes: 3 additions & 0 deletions .github/checkgroup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@ subprojects:
- id: "install"
paths:
- ".actions/**"
- ".github/actions/pkg-check/*"
- ".github/actions/pkg-install/*"
- ".github/workflows/_build-packages.yml"
- ".github/workflows/ci-pkg-install.yml"
- "setup.py"
- "src/**"
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/_build-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Building packages

on:
workflow_call:
inputs:
artifact-name:
description: 'Unique name for collecting artifacts'
required: true
type: string
pkg-names:
description: 'list package names to be build in json format'
required: false
type: string
default: |
["lightning", "app", "lite", "pytorch"]

defaults:
run:
shell: bash

jobs:

init:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- run: |
mkdir dist && touch dist/.placeholder
- uses: actions/upload-artifact@v3
with:
name: ${{ inputs.artifact-name }}
path: dist


build-packages:
needs: init
runs-on: ubuntu-20.04
strategy:
max-parallel: 1 # run sequential to prevent download/upload collisions
matrix:
pkg-name: ${{ fromJSON(inputs.pkg-names) }}
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: ${{ inputs.artifact-name }}
path: pypi
- uses: actions/setup-python@v4
with:
python-version: 3.9

- run: python -c "print('NB_DIRS=' + str(2 if '${{ matrix.pkg-name }}' == 'pytorch' else 1))" >> $GITHUB_ENV
- uses: ./.github/actions/pkg-check
with:
pkg-name: ${{ matrix.pkg-name }}
nb-dirs: ${{ env.NB_DIRS }}

- run: |
mkdir pypi/${{ matrix.pkg-name }}
cp dist/* pypi/${{ matrix.pkg-name }}/

- uses: actions/upload-artifact@v3
with:
name: ${{ inputs.artifact-name }}
path: pypi
8 changes: 6 additions & 2 deletions .github/workflows/ci-app-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,16 @@ jobs:

- name: Adjust tests
if: ${{ matrix.pkg-name == 'lightning' }}
run: python .actions/assistant.py copy_replace_imports --source_dir="./tests" --source_import="lightning_app" --target_import="lightning.app"
run: |
python .actions/assistant.py copy_replace_imports --source_dir="./tests" \
--source_import="lightning_app" --target_import="lightning.app"

- name: Adjust examples
if: ${{ matrix.pkg-name != 'lightning' }}
run: |
python .actions/assistant.py copy_replace_imports --source_dir="./examples" --source_import="lightning.app,lightning" --target_import="lightning_app,lightning_app"
python .actions/assistant.py copy_replace_imports --source_dir="./examples" \
--source_import="lightning.app,lightning" \
--target_import="lightning_app,lightning_app"

- name: Switch coverage scope
run: python -c "print('COVERAGE_SCOPE=' + str('lightning' if '${{matrix.pkg-name}}' == 'lightning' else 'lightning_app'))" >> $GITHUB_ENV
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/ci-app-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,17 @@ jobs:

- name: Adjust tests
if: ${{ matrix.pkg-name == 'lightning' }}
run: python .actions/assistant.py copy_replace_imports --source_dir="./tests" --source_import="lightning_app,lightning_lite,pytorch_lightning" --target_import="lightning.app,lightning.lite,lightning.pytorch"
run: |
python .actions/assistant.py copy_replace_imports --source_dir="./tests" \
--source_import="lightning_app,lightning_lite,pytorch_lightning" \
--target_import="lightning.app,lightning.lite,lightning.pytorch"

- name: Adjust examples
if: ${{ matrix.pkg-name != 'lightning' }}
run: |
python .actions/assistant.py copy_replace_imports --source_dir="./examples" --source_import="lightning.app,lightning" --target_import="lightning_app,lightning_app"
python .actions/assistant.py copy_replace_imports --source_dir="./examples" \
--source_import="lightning.app,lightning" \
--target_import="lightning_app,lightning_app"

- name: Switch coverage scope
run: python -c "print('COVERAGE_SCOPE=' + str('lightning' if '${{matrix.pkg-name}}' == 'lightning' else 'lightning_app'))" >> $GITHUB_ENV
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ci-lite-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ jobs:

- name: Adjust tests
if: ${{ matrix.pkg-name == 'lightning' }}
run: python .actions/assistant.py copy_replace_imports --source_dir="./tests" --source_import="lightning_lite" --target_import="lightning.lite"
run: |
python .actions/assistant.py copy_replace_imports --source_dir="./tests" \
--source_import="lightning_lite" --target_import="lightning.lite"

- name: Testing Warnings
# the stacklevel can only be set on >=3.7
Expand Down
59 changes: 42 additions & 17 deletions .github/workflows/ci-pkg-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
paths:
- ".actions/**"
- ".github/actions/pkg-check/*"
- ".github/actions/pkg-install/*"
- ".github/workflows/_build-packages.yml"
- ".github/workflows/ci-pkg-install.yml"
- "setup.py"
- "src/**"
Expand All @@ -28,49 +31,71 @@ defaults:

jobs:

build-packages:
uses: ./.github/workflows/_build-packages.yml
with:
artifact-name: dist-packages-${{ github.sha }}

install-pkg:
needs: build-packages
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macOS-12, windows-2022]
pkg-name: ["app", "lite", "pytorch", "lightning"]
python-version: ["3.7" , "3.10"]
# TODO: add also install from source
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: DocTests actions
working-directory: .actions/
run: |
pip install -q pytest
python -m pytest setup_tools.py

- run: python -c "print('NB_DIRS=' + str(2 if '${{ matrix.pkg-name }}' == 'pytorch' else 1))" >> $GITHUB_ENV

- uses: ./.github/actions/pkg-check
- uses: actions/download-artifact@v3
with:
pkg-name: ${{ matrix.pkg-name }}
nb-dirs: ${{ env.NB_DIRS }}
name: dist-packages-${{ github.sha }}
path: dist

- run: |
python -c "print('PKG_DIR=' + {'notset': 'lightning'}.get('${{matrix.pkg-name}}', '${{matrix.pkg-name}}'))" >> $GITHUB_ENV
- uses: ./.github/actions/pkg-install
with:
pkg-folder: dist/${{ env.PKG_DIR }}
pkg-name: ${{ matrix.pkg-name }}

- name: Run CLI
# todo: add testing for `lightning_app`
if: ${{ matrix.pkg-name == 'lightning' }}
- name: Run CLI (via python)
if: ${{ matrix.pkg-name == 'lightning' || matrix.pkg-name == 'notset' }}
run: python -m lightning --version
- name: Run CLI (direct bash)
if: ${{ matrix.pkg-name == 'lightning' || matrix.pkg-name == 'app' }}
run: lightning --version

- name: Adjust code for Lit
if: ${{ matrix.pkg-name == 'lightning' || matrix.pkg-name == 'notset' }}
run: |
pip install -q -r .actions/requirements.txt
python .actions/assistant.py copy_replace_imports --source_dir="./src" \
--source_import="pytorch_lightning,lightning_lite,lightning_app" \
--target_import="lightning.pytorch,lightning.lite,lightning.app"
rm -rf src/lightning
- name: Rename src folders
working-directory: src/
run: |
mv pytorch_lightning pl
mv lightning_lite lit_lite
mv lightning_app lit_app

- name: DocTests actions
working-directory: .actions/
run: |
pip install -q pytest
python -m pytest setup_tools.py
- name: DocTest package
env:
LIGHTING_TESTING: 1 # path for require wrapper
PY_IGNORE_IMPORTMISMATCH: 1
run: |
pip install -q "pytest-doctestplus>=0.9.0"
pip list
PKG_NAME=$(python -c "print({'app': 'lightning_app', 'lite': 'lightning_lite', 'pytorch': 'pytorch_lightning', 'lightning': 'lightning'}['${{matrix.pkg-name}}'])")
PKG_NAME=$(python -c "print({'app': 'lit_app', 'lite': 'lit_lite', 'pytorch': 'pl'}.get('${{matrix.pkg-name}}', ''))")
python -m pytest src/${PKG_NAME} --ignore-glob="**/cli/*-template/**"
5 changes: 4 additions & 1 deletion .github/workflows/ci-pytorch-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@ jobs:

- name: Adjust tests
if: ${{ matrix.pkg-name == 'lightning' }}
run: python .actions/assistant.py copy_replace_imports --source_dir="./tests" --source_import="pytorch_lightning,lightning_lite" --target_import="lightning.pytorch,lightning.lite"
run: |
python .actions/assistant.py copy_replace_imports --source_dir="./tests" \
--source_import="pytorch_lightning,lightning_lite" \
--target_import="lightning.pytorch,lightning.lite"

- name: Testing Warnings
# the stacklevel can only be set on >=3.7
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/docs-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ jobs:
if: ${{ matrix.pkg-name == 'app' }}
run: |
pip install -q -r .actions/requirements.txt
python .actions/assistant.py copy_replace_imports --source_dir="./docs" --source_import="pytorch_lightning,lightning_lite" --target_import="lightning.pytorch,lightning.lite"
python .actions/assistant.py copy_replace_imports --source_dir="./docs" \
--source_import="pytorch_lightning,lightning_lite" \
--target_import="lightning.pytorch,lightning.lite"

- name: Install this package
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/legacy-checkpoints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ jobs:
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
title: Adding test for legacy checkpiont created with ${{ needs.create-legacy-ckpts.outputs.pl-version }}
title: Adding test for legacy checkpoint created with ${{ needs.create-legacy-ckpts.outputs.pl-version }}
delete-branch: true
labels: |
tests
Expand Down
Loading