1
- name : Test Lite
1
+ name : Test Fabric
2
2
3
3
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
4
4
on :
9
9
types : [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
10
10
paths :
11
11
- " .actions/**"
12
- - " requirements/lite /**"
13
- - " src/lightning_lite /**"
14
- - " tests/tests_lite /**"
12
+ - " requirements/fabric /**"
13
+ - " src/lightning_fabric /**"
14
+ - " tests/tests_fabric /**"
15
15
- " setup.cfg" # includes pytest config
16
- - " .github/workflows/ci-lite- tests.yml"
16
+ - " .github/workflows/ci-tests-fabric .yml"
17
17
- " !requirements/*/docs.txt"
18
18
- " !*.md"
19
19
- " !**/*.md"
@@ -30,7 +30,7 @@ defaults:
30
30
shell : bash
31
31
32
32
jobs :
33
- lite -cpu :
33
+ fabric -cpu :
34
34
runs-on : ${{ matrix.os }}
35
35
if : github.event.pull_request.draft == false
36
36
strategy :
@@ -39,21 +39,21 @@ jobs:
39
39
include :
40
40
# assign python and pytorch version combinations to operating systems (arbitrarily)
41
41
# note: there's no distribution of torch==1.10 for Python>=3.10
42
- - {os: "macOS-11", pkg-name: "lite ", python-version: "3.8", pytorch-version: "1.11"}
43
- - {os: "macOS-11", pkg-name: "lite ", python-version: "3.9", pytorch-version: "1.12"}
44
- - {os: "ubuntu-20.04", pkg-name: "lite ", python-version: "3.8", pytorch-version: "1.10"}
45
- - {os: "ubuntu-20.04", pkg-name: "lite ", python-version: "3.9", pytorch-version: "1.11"}
46
- - {os: "ubuntu-20.04", pkg-name: "lite ", python-version: "3.10", pytorch-version: "1.12"}
47
- - {os: "windows-2022", pkg-name: "lite ", python-version: "3.9", pytorch-version: "1.11"}
48
- - {os: "windows-2022", pkg-name: "lite ", python-version: "3.10", pytorch-version: "1.12"}
42
+ - {os: "macOS-11", pkg-name: "fabric ", python-version: "3.8", pytorch-version: "1.11"}
43
+ - {os: "macOS-11", pkg-name: "fabric ", python-version: "3.9", pytorch-version: "1.12"}
44
+ - {os: "ubuntu-20.04", pkg-name: "fabric ", python-version: "3.8", pytorch-version: "1.10"}
45
+ - {os: "ubuntu-20.04", pkg-name: "fabric ", python-version: "3.9", pytorch-version: "1.11"}
46
+ - {os: "ubuntu-20.04", pkg-name: "fabric ", python-version: "3.10", pytorch-version: "1.12"}
47
+ - {os: "windows-2022", pkg-name: "fabric ", python-version: "3.9", pytorch-version: "1.11"}
48
+ - {os: "windows-2022", pkg-name: "fabric ", python-version: "3.10", pytorch-version: "1.12"}
49
49
# only run PyTorch latest with Python latest
50
- - {os: "macOS-11", pkg-name: "lite ", python-version: "3.10", pytorch-version: "1.13"}
51
- - {os: "ubuntu-20.04", pkg-name: "lite ", python-version: "3.10", pytorch-version: "1.13"}
52
- - {os: "windows-2022", pkg-name: "lite ", python-version: "3.10", pytorch-version: "1.13"}
50
+ - {os: "macOS-11", pkg-name: "fabric ", python-version: "3.10", pytorch-version: "1.13"}
51
+ - {os: "ubuntu-20.04", pkg-name: "fabric ", python-version: "3.10", pytorch-version: "1.13"}
52
+ - {os: "windows-2022", pkg-name: "fabric ", python-version: "3.10", pytorch-version: "1.13"}
53
53
# "oldest" versions tests, only on minimum Python
54
- - {os: "macOS-11", pkg-name: "lite ", python-version: "3.7", pytorch-version: "1.10", requires: "oldest"}
55
- - {os: "ubuntu-20.04", pkg-name: "lite ", python-version: "3.7", pytorch-version: "1.10", requires: "oldest"}
56
- - {os: "windows-2022", pkg-name: "lite ", python-version: "3.7", pytorch-version: "1.10", requires: "oldest"}
54
+ - {os: "macOS-11", pkg-name: "fabric ", python-version: "3.7", pytorch-version: "1.10", requires: "oldest"}
55
+ - {os: "ubuntu-20.04", pkg-name: "fabric ", python-version: "3.7", pytorch-version: "1.10", requires: "oldest"}
56
+ - {os: "windows-2022", pkg-name: "fabric ", python-version: "3.7", pytorch-version: "1.10", requires: "oldest"}
57
57
# "lightning" installs the monolithic package
58
58
- {os: "macOS-11", pkg-name: "lightning", python-version: "3.8", pytorch-version: "1.13"}
59
59
- {os: "ubuntu-20.04", pkg-name: "lightning", python-version: "3.8", pytorch-version: "1.13"}
87
87
- name : Adjust PyTorch versions in requirements files
88
88
if : ${{ matrix.requires != 'oldest' }}
89
89
run : |
90
- python ./requirements/pytorch/adjust-versions.py requirements/lite /base.txt ${{ matrix.pytorch-version }}
91
- cat requirements/lite /base.txt
90
+ python ./requirements/pytorch/adjust-versions.py requirements/fabric /base.txt ${{ matrix.pytorch-version }}
91
+ cat requirements/fabric /base.txt
92
92
93
93
- name : Get pip cache dir
94
94
id : pip-cache
98
98
uses : actions/cache@v3
99
99
with :
100
100
path : ${{ steps.pip-cache.outputs.dir }}
101
- key : ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ matrix.pkg-name }}-${{ matrix.release }}-${{ matrix.requires }}-${{ hashFiles('requirements/lite /*.txt') }}
101
+ key : ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ matrix.pkg-name }}-${{ matrix.release }}-${{ matrix.requires }}-${{ hashFiles('requirements/fabric /*.txt') }}
102
102
restore-keys : |
103
103
${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ matrix.pkg-name }}-${{ matrix.release }}-${{ matrix.requires }}-
104
104
@@ -109,27 +109,27 @@ jobs:
109
109
env :
110
110
PACKAGE_NAME : ${{ matrix.pkg-name }}
111
111
run : |
112
- pip install -e . "pytest-timeout" -r requirements/lite /devel.txt --upgrade --find-links ${TORCH_URL}
112
+ pip install -e . "pytest-timeout" -r requirements/fabric /devel.txt --upgrade --find-links ${TORCH_URL}
113
113
pip list
114
114
115
115
- name : Adjust tests
116
116
if : ${{ matrix.pkg-name == 'lightning' }}
117
117
run : |
118
118
python .actions/assistant.py copy_replace_imports --source_dir="./tests" \
119
- --source_import="lightning_lite " --target_import="lightning.lite "
119
+ --source_import="lightning_fabric " --target_import="lightning.fabric "
120
120
121
121
- name : Testing Warnings
122
122
# the stacklevel can only be set on >=3.7
123
123
if : matrix.python-version != '3.7'
124
- working-directory : tests/tests_lite
124
+ working-directory : tests/tests_fabric
125
125
# needs to run outside of `pytest`
126
126
run : python utilities/test_warnings.py
127
127
128
128
- name : Switch coverage scope
129
- run : python -c "print('COVERAGE_SCOPE=' + str('lightning' if '${{matrix.pkg-name}}' == 'lightning' else 'lightning_lite '))" >> $GITHUB_ENV
129
+ run : python -c "print('COVERAGE_SCOPE=' + str('lightning' if '${{matrix.pkg-name}}' == 'lightning' else 'lightning_fabric '))" >> $GITHUB_ENV
130
130
131
- - name : Testing Lite
132
- working-directory : tests/tests_lite
131
+ - name : Testing Fabric
132
+ working-directory : tests/tests_fabric
133
133
# NOTE: do not include coverage report here, see: https://github.com/nedbat/coveragepy/issues/1003
134
134
run : coverage run --source ${COVERAGE_SCOPE} -m pytest -v --timeout=30 --durations=50 --junitxml=results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}-${{ matrix.release }}.xml
135
135
@@ -138,11 +138,11 @@ jobs:
138
138
uses : actions/upload-artifact@v3
139
139
with :
140
140
name : unittest-results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}-${{ matrix.release }}
141
- path : tests/tests_lite /results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}-${{ matrix.release }}.xml
141
+ path : tests/tests_fabric /results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}-${{ matrix.release }}.xml
142
142
143
143
- name : Statistics
144
144
if : success()
145
- working-directory : tests/tests_lite
145
+ working-directory : tests/tests_fabric
146
146
run : |
147
147
coverage report
148
148
coverage xml
@@ -153,7 +153,7 @@ jobs:
153
153
continue-on-error : true
154
154
with :
155
155
token : ${{ secrets.CODECOV_TOKEN }}
156
- file : tests/tests_lite /coverage.xml
156
+ file : tests/tests_fabric /coverage.xml
157
157
flags : ${COVERAGE_SCOPE},cpu,pytest,python${{ matrix.python-version }}
158
158
name : CPU-coverage
159
159
fail_ci_if_error : false
0 commit comments