Skip to content

Commit 4b23e70

Browse files
authored
Merge branch 'Lightning-AI:master' into mlflow-skinny
2 parents b6df338 + 23e71a8 commit 4b23e70

File tree

29 files changed

+267
-192
lines changed

29 files changed

+267
-192
lines changed

.azure/app-cloud-e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ pr:
3434
- "tests/integrations_app/**"
3535
- "setup.py"
3636
exclude:
37+
- "!tests/integrations_app/flagship/**"
3738
- "requirements/*/docs.txt"
3839
- "*.md"
3940
- "**/*.md"
@@ -150,7 +151,6 @@ jobs:
150151
displayName: 'Install Lightning & dependencies'
151152
152153
- bash: |
153-
pip install playwright
154154
python -m playwright install # --with-deps
155155
displayName: 'Install Playwright system dependencies'
156156

.azure/app-flagships.yml

Lines changed: 0 additions & 154 deletions
This file was deleted.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Adjust App environment
2+
description: make adjustment specific for selected App
3+
4+
inputs:
5+
name:
6+
description: application name
7+
required: true
8+
9+
runs:
10+
using: "composite"
11+
steps:
12+
13+
- name: adjust env -> Flashy
14+
if: inputs.name == 'flashy'
15+
working-directory: tests/_flagship-app
16+
run: |
17+
ls -l .
18+
pip install -r requirements-dev.txt -f $TORCH_URL
19+
pip install -e . -f $TORCH_URL
20+
shell: bash
21+
22+
- name: adjust env -> Muse
23+
if: inputs.name == 'muse'
24+
working-directory: tests/
25+
run: |
26+
pip install -e _flagship-app -f $TORCH_URL
27+
cp _flagship-app/tests/test_app.py \
28+
integrations_app/flagship/test_${{ inputs.name }}.py
29+
shell: bash
30+
31+
- name: adjust env -> Jupyter
32+
if: inputs.name == 'jupyter'
33+
working-directory: tests/
34+
run: |
35+
pip install -e _flagship-app -f $TORCH_URL
36+
# pip install -r _flagship-app/tests/requirements-dev.txt
37+
cp _flagship-app/tests/test_jupyter_app.py \
38+
integrations_app/flagship/test_${{ inputs.name }}.py
39+
shell: bash

.github/checkgroup.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ subprojects:
205205
- "examples/fabric/**"
206206
- "examples/run_fabric_examples.sh"
207207
- "tests/tests_fabric/run_standalone_*.sh"
208-
- "tests/tests_pytorch/run_standalone_tests.sh" # used by Lite through a symlink
208+
- "tests/tests_pytorch/run_standalone_tests.sh" # used by Fabric through a symlink
209209
- "requirements/fabric/**"
210210
- "src/lightning_fabric/**"
211211
- "tests/tests_fabric/**"
@@ -246,6 +246,7 @@ subprojects:
246246
- ".github/workflows/ci-examples-app.yml"
247247
- "src/lightning_app/**"
248248
- "tests/integrations_app/**"
249+
- "!tests/integrations_app/flagship/**"
249250
- "examples/app_*/**"
250251
- "requirements/app/**"
251252
- "setup.py"
@@ -263,13 +264,21 @@ subprojects:
263264
- "app-examples (windows-2022, app, 3.9, oldest)"
264265
- "app-examples (windows-2022, lightning, 3.9, latest)"
265266

267+
- id: "lightning: Flagships"
268+
paths:
269+
- ".github/workflows/ci-flagship-apps.yml"
270+
- "tests/integrations_app/flagship/**"
271+
checks:
272+
- "app-flagships (flashy, Lightning-AI/LAI-Flashy-App)"
273+
266274
- id: "lightning_app: Azure"
267275
paths:
268276
- ".actions/**"
269277
- ".azure/app-cloud-e2e.yml"
270278
- "src/lightning_app/**"
271279
- "requirements/app/**"
272280
- "tests/integrations_app/**"
281+
- "!tests/integrations_app/flagship/**"
273282
- "setup.py"
274283
- "!requirements/*/docs.txt"
275284
- "!*.md"

.github/workflows/ci-examples-app.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
- ".github/workflows/ci-examples-app.yml"
1313
- "src/lightning_app/**"
1414
- "tests/integrations_app/**"
15+
- "!tests/integrations_app/flagship/**"
1516
- "examples/app_*/**"
1617
- "requirements/app/**"
1718
- "setup.py"
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
name: Test App - flagships
2+
3+
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
branches: ["release/*"]
7+
pull_request:
8+
branches: [master, "release/*"]
9+
types: [opened, reopened, ready_for_review, synchronize]
10+
paths:
11+
- ".github/workflows/ci-flagship-apps.yml"
12+
- "tests/integrations_app/flagship/**"
13+
workflow_dispatch: {}
14+
# TODO: inputs specifying lightning branch and switch prod/staging
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
18+
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
19+
20+
defaults:
21+
run:
22+
shell: bash
23+
24+
jobs:
25+
app-flagships:
26+
if: github.event.pull_request.draft == false
27+
runs-on: ubuntu-latest
28+
container:
29+
image: mcr.microsoft.com/playwright/python:v1.29.1-focal
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
include:
34+
- {app: "flashy", repo: "Lightning-AI/LAI-Flashy-App"}
35+
- {app: "muse", repo: "Lightning-AI/stable-diffusion-deploy"}
36+
- {app: "jupyter", repo: "Lightning-AI/LAI-Jupyter-Component"}
37+
38+
# TODO:
39+
# - Training Studio
40+
# - Echo
41+
# - StreamLit / Gradio
42+
# - All homepage & docs apps
43+
44+
env:
45+
HEADLESS: '1'
46+
PACKAGE_LIGHTNING: '1'
47+
CLOUD: '1'
48+
VIDEO_LOCATION: './videos'
49+
HAR_LOCATION: './artifacts/hars'
50+
SLOW_MO: '50'
51+
LIGHTNING_DEBUG: '1'
52+
TORCH_URL: 'https://download.pytorch.org/whl/cpu/torch_stable.html'
53+
# Timeout: https://stackoverflow.com/a/59076067/4521646
54+
timeout-minutes: 20
55+
56+
steps:
57+
- uses: actions/checkout@v3
58+
- name: Set up Python ${{ matrix.python-version }}
59+
uses: actions/setup-python@v4
60+
with:
61+
python-version: ${{ matrix.python-version }}
62+
63+
- name: basic setup
64+
run: |
65+
mkdir -p tests/_flagships
66+
mkdir -p $VIDEO_LOCATION
67+
python -m playwright install # --with-deps
68+
69+
- name: Adjust testing
70+
run: |
71+
pip install -q -r .actions/requirements.txt
72+
python .actions/assistant.py copy_replace_imports --source_dir="./tests" \
73+
--source_import="lightning_app" --target_import="lightning.app"
74+
75+
- name: Clone the Repo/App
76+
uses: actions/checkout@v3
77+
with:
78+
repository: ${{ matrix.repo }}
79+
path: tests/_flagship-app
80+
81+
- name: Adjust env. for this App
82+
uses: ./.github/actions/prep-apps
83+
with:
84+
name: ${{ matrix.app }}
85+
86+
- name: Install Lightning package
87+
run: pip install -e .[cloud,test] -f $TORCH_URL
88+
- name: List pip dependency
89+
run: pip --version && pip list
90+
91+
- name: Run the tests
92+
working-directory: tests/
93+
env:
94+
LIGHTNING_USER_ID: ${{ secrets.LIGHTNING_USER_ID_PROD }}
95+
LIGHTNING_API_KEY: ${{ secrets.LIGHTNING_API_KEY_PROD }}
96+
LIGHTNING_USERNAME: ${{ secrets.LIGHTNING_USERNAME_PROD }}
97+
LIGHTNING_CLOUD_URL: ${{ secrets.LIGHTNING_CLOUD_URL_PROD }}
98+
run: |
99+
ls -l _flagship-app
100+
python -m pytest integrations_app/flagship/test_${{ matrix.app }}.py \
101+
--capture=no -v --color=yes
102+
103+
- name: Upload recordings
104+
uses: actions/upload-artifact@v3
105+
if: failure()
106+
with:
107+
name: flahship-app-${{ matrix.app }}
108+
path: ${{ env.VIDEO_LOCATION }}
109+
110+
- name: Clean Previous Apps
111+
if: always()
112+
timeout-minutes: 3
113+
env:
114+
LIGHTNING_USER_ID: ${{ secrets.LIGHTNING_USER_ID_PROD }}
115+
LIGHTNING_API_KEY: ${{ secrets.LIGHTNING_API_KEY_PROD }}
116+
LIGHTNING_USERNAME: ${{ secrets.LIGHTNING_USERNAME_PROD }}
117+
LIGHTNING_CLOUD_URL: ${{ secrets.LIGHTNING_CLOUD_URL_PROD }}
118+
run: |
119+
time python -c "from lightning.app import testing; testing.delete_cloud_lightning_apps()"

docs/source-app/api_reference/components.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ ___________________
2828
~serve.python_server.PythonServer
2929
~serve.streamlit.ServeStreamlit
3030
~multi_node.base.MultiNode
31-
~multi_node.lite.LiteMultiNode
31+
~multi_node.fabric.FabricMultiNode
3232
~multi_node.pytorch_spawn.PyTorchSpawnMultiNode
3333
~multi_node.trainer.LightningTrainerMultiNode
3434
~serve.auto_scaler.AutoScaler

0 commit comments

Comments
 (0)