Skip to content

Commit 8489571

Browse files
authored
Merge branch 'master' into feat/to_tensorrt
2 parents 9d92ddf + c6b6553 commit 8489571

File tree

20 files changed

+69
-25
lines changed

20 files changed

+69
-25
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/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:

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

docs/source-pytorch/common/precision_intermediate.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ Under the hood, we use `transformer_engine.pytorch.fp8_autocast <https://docs.nv
165165
Quantization via Bitsandbytes
166166
*****************************
167167

168-
`bitsandbytes <https://github.com/TimDettmers/bitsandbytes>`__ (BNB) is a library that supports quantizing :class:`torch.nn.Linear` weights.
168+
`bitsandbytes <https://github.com/bitsandbytes-foundation/bitsandbytes>`__ (BNB) is a library that supports quantizing :class:`torch.nn.Linear` weights.
169169

170170
Both 4-bit (`paper reference <https://arxiv.org/abs/2305.14314v1>`__) and 8-bit (`paper reference <https://arxiv.org/abs/2110.02861>`__) quantization is supported.
171171
Specifically, we support the following modes:

docs/source-pytorch/glossary/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ Glossary
209209

210210
.. displayitem::
211211
:header: LightningModule
212-
:description: A base class organizug your neural network module
212+
:description: A base class organizing your neural network module
213213
:col_css: col-md-12
214214
:button_link: ../common/lightning_module.html
215215
:height: 100

requirements/ci.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
setuptools <80.9.1
22
wheel <0.46.0
3-
awscli >=1.30.0, <1.41.0
3+
awscli >=1.30.0, <1.42.0
44
twine ==6.1.0
55
importlib-metadata <9.0.0
66
wget

0 commit comments

Comments
 (0)