Skip to content

Commit 3aec635

Browse files
authored
Merge branch 'master' into generic-weight-averaging
2 parents 410fe14 + 20960ec commit 3aec635

File tree

73 files changed

+425
-126
lines changed

Some content is hidden

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

73 files changed

+425
-126
lines changed

.azure/gpu-tests-fabric.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ jobs:
130130
- bash: |
131131
set -e
132132
extra=$(python -c "print({'lightning': 'fabric-'}.get('$(PACKAGE_NAME)', ''))")
133-
pip install -e ".[${extra}dev]" -U --extra-index-url="${TORCH_URL}"
133+
pip install -e ".[${extra}dev]" -U --upgrade-strategy=eager --extra-index-url="${TORCH_URL}"
134134
displayName: "Install package & dependencies"
135135
136136
- bash: |

.azure/gpu-tests-pytorch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ jobs:
134134
- bash: |
135135
set -e
136136
extra=$(python -c "print({'lightning': 'pytorch-'}.get('$(PACKAGE_NAME)', ''))")
137-
pip install -e ".[${extra}dev]" -U --extra-index-url="${TORCH_URL}"
137+
pip install -e ".[${extra}dev]" -U --upgrade-strategy=eager --extra-index-url="${TORCH_URL}"
138138
displayName: "Install package & dependencies"
139139
140140
- bash: pip uninstall -y lightning

.github/CONTRIBUTING.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Welcome to the PyTorch Lightning community! We're building the most advanced research platform on the planet to implement the latest, best practices
44
and integrations that the amazing PyTorch team and other research organization rolls out!
55

6-
If you are new to open source, check out [this blog to get started with your first Open Source contribution](https://devblog.pytorchlightning.ai/quick-contribution-guide-86d977171b3a).
6+
If you are new to open source, check out [this blog to get started with your first Open Source contribution](https://medium.com/pytorch-lightning/quick-contribution-guide-86d977171b3a).
77

88
## Main Core Value: One less thing to remember
99

@@ -109,6 +109,50 @@ ______________________________________________________________________
109109

110110
## Guidelines
111111

112+
### Development environment
113+
114+
To set up a local development environment, we recommend using `uv`, which can be installed following their [instructions](https://docs.astral.sh/uv/getting-started/installation/).
115+
116+
Once `uv` has been installed, begin by cloning the forked repository:
117+
118+
```bash
119+
git clone https://github.com/{YOUR_GITHUB_USERNAME}/pytorch-lightning.git
120+
cd pytorch-lightning
121+
```
122+
123+
> If you're using [Lightning Studio](https://lightning.ai) or already have your `uv venv` activated, you can quickly set up the project by running:
124+
125+
```bash
126+
make setup
127+
```
128+
129+
This will:
130+
131+
- Install all required dependencies.
132+
- Perform an editable install of the `pytorch-lightning` project.
133+
- Install and configure `pre-commit`.
134+
135+
#### Manual Setup (Optional)
136+
137+
If you prefer more fine-grained control over the dependencies, you can set up the environment manually:
138+
139+
```bash
140+
uv venv
141+
# uv venv --python 3.11 # use this instead if you need a specific python version
142+
143+
source .venv/bin/activate # command may differ based on your shell
144+
uv pip install ".[dev, examples]"
145+
```
146+
147+
Once the dependencies have been installed, install pre-commit and set up the git hook scripts:
148+
149+
```bash
150+
uv pip install pre-commit
151+
pre-commit install
152+
```
153+
154+
If you would like more information regarding the uv commands, please refer to uv's documentation for more information on their [pip interface](https://docs.astral.sh/uv/pip/).
155+
112156
### Developments scripts
113157

114158
To build the documentation locally, simply execute the following commands from project root (only for Unix):

.github/checkgroup.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ subprojects:
135135
- "build-pl (3.11, 2.4, 12.1.1)"
136136
- "build-pl (3.12, 2.5, 12.1.1)"
137137
- "build-pl (3.12, 2.6, 12.4.1)"
138-
- "build-pl (3.12, 2.7, 12.6.3, true)"
138+
- "build-pl (3.12, 2.7, 12.6.3)"
139+
- "build-pl (3.12, 2.8, 12.6.3, true)"
139140

140141
# SECTION: lightning_fabric
141142

.github/markdown-links-config.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,9 @@
2222
"Accept-Encoding": "zstd, br, gzip, deflate"
2323
}
2424
}
25-
]
25+
],
26+
"timeout": "20s",
27+
"retryOn429": true,
28+
"retryCount": 5,
29+
"fallbackRetryDelay": "20s"
2630
}

.github/workflows/call-clear-cache.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
jobs:
2424
cron-clear:
2525
if: github.event_name == 'schedule' || github.event_name == 'pull_request'
26-
uses: Lightning-AI/utilities/.github/workflows/cleanup-caches.yml@v0.14.3
26+
uses: Lightning-AI/utilities/.github/workflows/cleanup-caches.yml@v0.15.0
2727
with:
2828
scripts-ref: v0.14.3
2929
dry-run: ${{ github.event_name == 'pull_request' }}
@@ -32,7 +32,7 @@ jobs:
3232

3333
direct-clear:
3434
if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request'
35-
uses: Lightning-AI/utilities/.github/workflows/cleanup-caches.yml@v0.14.3
35+
uses: Lightning-AI/utilities/.github/workflows/cleanup-caches.yml@v0.15.0
3636
with:
3737
scripts-ref: v0.14.3
3838
dry-run: ${{ github.event_name == 'pull_request' }}

.github/workflows/ci-schema.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
check:
11-
uses: Lightning-AI/utilities/.github/workflows/check-schema.yml@v0.14.3
11+
uses: Lightning-AI/utilities/.github/workflows/check-schema.yml@v0.15.0
1212
with:
1313
# skip azure due to the wrong schema file by MSFT
1414
# https://github.com/Lightning-AI/lightning-flash/pull/1455#issuecomment-1244793607

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ jobs:
138138
- name: Install package & dependencies
139139
timeout-minutes: 20
140140
run: |
141-
pip install -e ".[${EXTRA_PREFIX}test,${EXTRA_PREFIX}strategies]" -U --prefer-binary \
141+
pip install -e ".[${EXTRA_PREFIX}test,${EXTRA_PREFIX}strategies]" \
142+
-U --upgrade-strategy=eager --prefer-binary \
142143
--extra-index-url="${TORCH_URL}" --find-links="${PYPI_CACHE_DIR}"
143144
pip list
144145
- name: Dump handy wheels

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ jobs:
136136
- name: Install package & dependencies
137137
timeout-minutes: 20
138138
run: |
139-
pip install ".[${EXTRA_PREFIX}extra,${EXTRA_PREFIX}test,${EXTRA_PREFIX}strategies]" -U --prefer-binary \
139+
pip install ".[${EXTRA_PREFIX}extra,${EXTRA_PREFIX}test,${EXTRA_PREFIX}strategies]" \
140+
-U --upgrade-strategy=eager --prefer-binary \
140141
-r requirements/_integrations/accelerators.txt \
141142
--extra-index-url="${TORCH_URL}" --find-links="${PYPI_CACHE_DIR}"
142143
pip list

.github/workflows/docker-build.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ jobs:
4949
- { python_version: "3.11", pytorch_version: "2.4", cuda_version: "12.1.1" }
5050
- { python_version: "3.12", pytorch_version: "2.5", cuda_version: "12.1.1" }
5151
- { python_version: "3.12", pytorch_version: "2.6", cuda_version: "12.4.1" }
52-
- { python_version: "3.12", pytorch_version: "2.7", cuda_version: "12.6.3", latest: "true" }
52+
- { python_version: "3.12", pytorch_version: "2.7", cuda_version: "12.6.3" }
53+
- { python_version: "3.12", pytorch_version: "2.8", cuda_version: "12.6.3", latest: "true" }
5354
steps:
5455
- uses: actions/checkout@v4
5556
with:
@@ -97,7 +98,7 @@ jobs:
9798
# adding dome more images as Thunder mainly using python 3.10,
9899
# and we need to support integrations as for example LitGPT
99100
python_version: ["3.10"]
100-
pytorch_version: ["2.6.0", "2.7.1"]
101+
pytorch_version: ["2.7.1", "2.8.0"]
101102
cuda_version: ["12.6.3"]
102103
include:
103104
# These are the base images for PL release docker images.
@@ -109,6 +110,7 @@ jobs:
109110
- { python_version: "3.12", pytorch_version: "2.5.1", cuda_version: "12.1.1" }
110111
- { python_version: "3.12", pytorch_version: "2.6.0", cuda_version: "12.4.1" }
111112
- { python_version: "3.12", pytorch_version: "2.7.1", cuda_version: "12.6.3" }
113+
- { python_version: "3.12", pytorch_version: "2.8.0", cuda_version: "12.6.3" }
112114
steps:
113115
- uses: actions/checkout@v4
114116
- uses: docker/setup-buildx-action@v3
@@ -129,6 +131,7 @@ jobs:
129131
PYTHON_VERSION=${{ matrix.python_version }}
130132
PYTORCH_VERSION=${{ matrix.pytorch_version }}
131133
CUDA_VERSION=${{ matrix.cuda_version }}
134+
MAKE_FLAGS="-j2"
132135
file: dockers/base-cuda/Dockerfile
133136
push: ${{ env.PUSH_NIGHTLY }}
134137
tags: "pytorchlightning/pytorch_lightning:base-cuda-py${{ matrix.python_version }}-torch${{ env.PT_VERSION }}-cuda${{ matrix.cuda_version }}"
@@ -157,6 +160,8 @@ jobs:
157160
continue-on-error: true
158161
uses: docker/build-push-action@v6
159162
with:
163+
build-args: |
164+
PYTORCH_VERSION="25.04"
160165
file: dockers/nvidia/Dockerfile
161166
push: false
162167
timeout-minutes: 55

0 commit comments

Comments
 (0)