Skip to content

Commit e013cb2

Browse files
Merge branch 'master' into bugfix/20852_add-support-for-xla2.7-which-deprecated-methods
2 parents 39bd1b6 + 37f559e commit e013cb2

File tree

24 files changed

+83
-29
lines changed

24 files changed

+83
-29
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: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,36 @@ ______________________________________________________________________
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 repository:
117+
118+
```bash
119+
git clone https://github.com/Lightning-AI/lightning.git
120+
cd lightning
121+
```
122+
123+
Once in root level of the repository, create a new virtual environment and install the project dependencies.
124+
125+
```bash
126+
uv venv
127+
# uv venv --python 3.11 # use this instead if you need a specific python version
128+
129+
source .venv/bin/activate # command may differ based on your shell
130+
uv pip install ".[dev, examples]"
131+
```
132+
133+
Once the dependencies have been installed, install pre-commit and set up the git hook scripts:
134+
135+
```bash
136+
uv pip install pre-commit
137+
pre-commit install
138+
```
139+
140+
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/).
141+
112142
### Developments scripts
113143

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

.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/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/probot-check-group.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
if: github.event.pull_request.draft == false
1515
timeout-minutes: 61 # in case something is wrong with the internal timeout
1616
steps:
17-
- uses: Lightning-AI/probot@v5.4
17+
- uses: Lightning-AI/probot@v5.5
1818
env:
1919
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2020
with:

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ ______________________________________________________________________
5555

5656
 
5757

58+
# Why PyTorch Lightning?
59+
60+
Training models in plain PyTorch is tedious and error-prone - you have to manually handle things like backprop, mixed precision, multi-GPU, and distributed training, often rewriting code for every new project. PyTorch Lightning organizes PyTorch code to automate those complexities so you can focus on your model and data, while keeping full control and scaling from CPU to multi-node without changing your core code. But if you want control of those things, you can still opt into more DIY.
61+
62+
Fun analogy: If PyTorch is Javascript, PyTorch Lightning is ReactJS or NextJS.
63+
5864
# Lightning has 2 core packages
5965

6066
[PyTorch Lightning: Train and deploy PyTorch at scale](#why-pytorch-lightning).

_notebooks

docs/source-pytorch/advanced/transfer_learning.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Let's use the `AutoEncoder` as a feature extractor in a separate model.
3232
class CIFAR10Classifier(LightningModule):
3333
def __init__(self):
3434
# init the pretrained LightningModule
35-
self.feature_extractor = AutoEncoder.load_from_checkpoint(PATH)
35+
self.feature_extractor = AutoEncoder.load_from_checkpoint(PATH).encoder
3636
self.feature_extractor.freeze()
3737

3838
# the autoencoder outputs a 100-dim representation and CIFAR-10 has 10 classes

0 commit comments

Comments
 (0)