Skip to content

Commit 540527c

Browse files
authored
Merge branch 'master' into bnb-update
2 parents d57fc27 + b19c3a9 commit 540527c

File tree

163 files changed

+1129
-11887
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+1129
-11887
lines changed

.actions/assistant.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,7 @@
4444
"requirements/fabric/base.txt",
4545
"requirements/fabric/strategies.txt",
4646
),
47-
"data": (
48-
"requirements/data/data.txt",
49-
"requirements/data/cloud.txt",
50-
"requirements/data/examples.txt",
51-
),
47+
"data": ("requirements/data/data.txt",),
5248
}
5349
REQUIREMENT_FILES_ALL = list(chain(*REQUIREMENT_FILES.values()))
5450

.azure/gpu-tests-pytorch.yml

+1-8
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,9 @@ jobs:
105105
done
106106
displayName: "Adjust dependencies"
107107
108-
- bash: |
109-
pip install -q -r .actions/requirements.txt
110-
python .actions/assistant.py requirements_prune_pkgs \
111-
--packages="[lightning-colossalai]" \
112-
--req_files="[requirements/_integrations/strategies.txt]"
113-
displayName: "Prune packages" # these have installation issues
114-
115108
- bash: |
116109
extra=$(python -c "print({'lightning': 'pytorch-'}.get('$(PACKAGE_NAME)', ''))")
117-
pip install -e ".[${extra}dev]" -r requirements/_integrations/strategies.txt pytest-timeout -U --find-links="${TORCH_URL}"
110+
pip install -e ".[${extra}dev]" pytest-timeout -U --find-links="${TORCH_URL}"
118111
displayName: "Install package & dependencies"
119112
120113
- bash: pip uninstall -y lightning

.github/CODEOWNERS

+1-3
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,8 @@
4141
/src/lightning/pytorch/core/hooks.py @williamfalcon @tchaton @awaelchli @carmocca
4242
/src/lightning/pytorch/core/module.py @williamfalcon @tchaton @awaelchli @carmocca
4343

44-
# Data Utilities
45-
/examples/data/ @tchaton @nohalon @justusschock @lantiga
44+
# Lightning Data
4645
/src/lightning/data/ @tchaton
47-
/tests/tests_data @tchaton
4846

4947
# Lightning Fabric
5048
/src/lightning/fabric @awaelchli @carmocca @justusschock

.github/checkgroup.yml

-23
Original file line numberDiff line numberDiff line change
@@ -150,29 +150,6 @@ subprojects:
150150
- "build-pl (3.10, 2.0, 11.8.0)"
151151
- "build-pl (3.10, 2.1, 12.1.0)"
152152

153-
# SECTIONS: lightning_data
154-
155-
- id: "lightning_data: CPU workflow"
156-
paths:
157-
- ".actions/*"
158-
- "requirements/data/**"
159-
- "src/lightning/data/**"
160-
- "src/lightning_data/*"
161-
- "src/lightning/__init__.py"
162-
- "src/lightning/__setup__.py"
163-
- "src/lightning/__version__.py"
164-
- "tests/tests_data/**"
165-
- "examples/data/**"
166-
- "pyproject.toml" # includes pytest config
167-
- ".github/workflows/ci-tests-data.yml"
168-
- "!requirements/*/docs.txt"
169-
- "!*.md"
170-
- "!**/*.md"
171-
checks:
172-
- "data-cpu (macOS-11, lightning, 3.10, 2.1)"
173-
- "data-cpu (ubuntu-20.04, lightning, 3.10, 2.1)"
174-
- "data-cpu (windows-2022, lightning, 3.10, 2.1)"
175-
176153
# SECTION: lightning_fabric
177154

178155
- id: "lightning_fabric: CPU workflow"

.github/label-change.yml

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ data:
1414
- changed-files:
1515
- any-glob-to-any-file:
1616
- "src/lightning/data/**"
17-
- "tests/tests_data/**"
1817
- "requirements/data/**"
1918

2019
store:

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ jobs:
126126
coverage report -i
127127
128128
- name: Upload coverage to Codecov
129-
uses: codecov/codecov-action@v3
129+
uses: codecov/codecov-action@v4
130130
with:
131131
token: ${{ secrets.CODECOV_TOKEN }}
132132
file: tests/coverage.xml

.github/workflows/ci-pkg-install.yml

+12-6
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,22 @@ jobs:
100100
rm -f ./*/__*.py
101101
rm -f ./**/__*.py
102102
mv lightning lit # rename lightning folder to prevent accidental local imports
103-
- name: drop App doctest
104-
if: ${{ (matrix.pkg-name == 'lightning' || matrix.pkg-name == 'notset') && matrix.pkg-extra != 'app' }}
103+
- name: drop Secondary doctest
104+
if: ${{ matrix.pkg-name == 'lightning' || matrix.pkg-name == 'notset' }}
105105
working-directory: src/lit
106106
run: |
107-
rm -rf app
108-
rm -rf data
109-
rm -rf store
107+
items=("data" "store" "app")
108+
for item in "${items[@]}"; do
109+
if [[ "$item" == "${{ matrix.pkg-extra }}" ]]; then
110+
echo "Skipping $item"
111+
continue # Skip this iteration
112+
fi
113+
echo "Removing $item"
114+
rm -rf $item
115+
done
110116
- name: Install pytest doctest extension
111117
run: |
112-
pip install -q "pytest-doctestplus>=0.9.0"
118+
pip install -q -r requirements/doctests.txt
113119
pip list
114120
115121
- name: DocTest package

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ jobs:
151151
coverage report -i
152152
153153
- name: Upload coverage to Codecov
154-
uses: codecov/codecov-action@v3
154+
uses: codecov/codecov-action@v4
155155
with:
156156
token: ${{ secrets.CODECOV_TOKEN }}
157157
file: tests/coverage.xml

.github/workflows/ci-tests-data.yml

-119
This file was deleted.

.github/workflows/ci-tests-fabric.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ jobs:
173173
coverage xml
174174
175175
- name: Upload coverage to Codecov
176-
uses: codecov/codecov-action@v3
176+
uses: codecov/codecov-action@v4
177177
# see: https://github.com/actions/toolkit/issues/399
178178
continue-on-error: true
179179
with:

.github/workflows/ci-tests-pytorch.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ jobs:
210210
coverage xml
211211
212212
- name: Upload coverage to Codecov
213-
uses: codecov/codecov-action@v3
213+
uses: codecov/codecov-action@v4
214214
# see: https://github.com/actions/toolkit/issues/399
215215
continue-on-error: true
216216
with:

.github/workflows/ci-tests-store.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
coverage xml
8686
8787
- name: Upload coverage to Codecov
88-
uses: codecov/codecov-action@v3
88+
uses: codecov/codecov-action@v4
8989
# see: https://github.com/actions/toolkit/issues/399
9090
continue-on-error: true
9191
with:

.github/workflows/tpu-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ jobs:
165165
gcloud compute tpus tpu-vm list
166166
167167
- name: Upload coverage to Codecov
168-
uses: codecov/codecov-action@v3
168+
uses: codecov/codecov-action@v4
169169
continue-on-error: true
170170
with:
171171
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ docs/source-pytorch/_static/images/course_UvA-DL
2323
docs/source-pytorch/_static/images/lightning_examples
2424
docs/source-pytorch/_static/fetched-s3-assets
2525
docs/source-pytorch/integrations/hpu
26+
docs/source-pytorch/integrations/strategies/Hivemind.rst
2627

2728
docs/source-fabric/*/generated
2829

@@ -193,7 +194,6 @@ our_model.tar
193194
test.png
194195
saved_models
195196
data/
196-
!src/lightning/data/
197197
!examples/data/
198198
!tests/tests_pytorch/utilities/data/
199199
!requirements/data/

.pre-commit-config.yaml

+5-13
Original file line numberDiff line numberDiff line change
@@ -71,25 +71,18 @@ repos:
7171
additional_dependencies: [tomli]
7272
args: ["--in-place"]
7373

74-
- repo: https://github.com/asottile/yesqa
75-
rev: v1.5.0
74+
- repo: https://github.com/sphinx-contrib/sphinx-lint
75+
rev: v0.9.1
7676
hooks:
77-
- id: yesqa
78-
name: Unused noqa
79-
additional_dependencies:
80-
#- pep8-naming
81-
- flake8-pytest-style
82-
- flake8-bandit
83-
- flake8-simplify
84-
- flake8-return
77+
- id: sphinx-lint
8578

8679
- repo: https://github.com/astral-sh/ruff-pre-commit
8780
rev: "v0.2.0"
8881
hooks:
89-
- id: ruff
90-
args: ["--fix", "--preview"]
9182
- id: ruff-format
9283
args: ["--preview"]
84+
- id: ruff
85+
args: ["--fix", "--preview"]
9386

9487
- repo: https://github.com/executablebooks/mdformat
9588
rev: 0.7.17
@@ -102,7 +95,6 @@ repos:
10295
exclude: |
10396
(?x)^(
10497
src/lightning/app/CHANGELOG.md|
105-
src/lightning/data/CHANGELOG.md|
10698
src/lightning/fabric/CHANGELOG.md|
10799
src/lightning/pytorch/CHANGELOG.md|
108100
README.md

docs/source-app/core_api/lightning_app/communication_content.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ And here's the output you get when running the App using the **Lightning CLI**:
8787

8888
.. code-block:: console
8989
90-
INFO: Your app has started. View it in your browser: http://127.0.0.1:7501/view
91-
State: {'works': {'w': {'vars': {'counter': 1}}}}
92-
State: {'works': {'w': {'vars': {'counter': 2}}}}
93-
State: {'works': {'w': {'vars': {'counter': 3}}}}
94-
State: {'works': {'w': {'vars': {'counter': 3}}}}
95-
State: {'works': {'w': {'vars': {'counter': 4}}}}
96-
...
90+
INFO: Your app has started. View it in your browser: http://127.0.0.1:7501/view
91+
State: {'works': {'w': {'vars': {'counter': 1}}}}
92+
State: {'works': {'w': {'vars': {'counter': 2}}}}
93+
State: {'works': {'w': {'vars': {'counter': 3}}}}
94+
State: {'works': {'w': {'vars': {'counter': 3}}}}
95+
State: {'works': {'w': {'vars': {'counter': 4}}}}
96+
...
9797
9898
----
9999

docs/source-app/core_api/lightning_app/dynamic_work_content.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ There are a couple of ways you can add a dynamic Work:
4141
def run(self):
4242
4343
if not hasattr(self, "work"):
44-
# The `Work` component is created and attached here.
44+
# The `Work` component is created and attached here.
4545
setattr(self, "work", Work())
46-
# Run the `Work` component.
46+
# Run the `Work` component.
4747
getattr(self, "work").run()
4848
4949
**OPTION 2:** Use the built-in Lightning classes :class:`~lightning.app.structures.Dict` or :class:`~lightning.app.structures.List`
@@ -60,7 +60,7 @@ There are a couple of ways you can add a dynamic Work:
6060
6161
def run(self):
6262
if "work" not in self.dict:
63-
# The `Work` component is attached here.
63+
# The `Work` component is attached here.
6464
self.dict["work"] = Work()
6565
self.dict["work"].run()
6666

docs/source-app/glossary/environment_variables.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ Environment variables are available in all Flows and Works, and can be accessed
2424
print(os.environ["BAZ"]) # FAZ
2525
2626
.. note::
27-
Environment variables are not encrypted. For sensitive values, we recommend using :ref:`Encrypted Secrets <secrets>`.
27+
Environment variables are not encrypted. For sensitive values, we recommend using :ref:`Encrypted Secrets <secrets>`.

docs/source-app/glossary/secrets.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Encrypted Secrets allow you to pass private data to your apps, like API keys, ac
88
Secrets provide you with a secure way to store this data in a way that is accessible to Apps so that they can authenticate third-party services/solutions.
99

1010
.. tip::
11-
For non-sensitive configuration values, we recommend using :ref:`plain-text Environment Variables <environment_variables>`.
11+
For non-sensitive configuration values, we recommend using :ref:`plain-text Environment Variables <environment_variables>`.
1212

1313
************
1414
Add a secret

0 commit comments

Comments
 (0)