Skip to content

Commit a77e336

Browse files
docs: migration guide to the latest [2/n] (#17103)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 69615f3 commit a77e336

25 files changed

+530
-329
lines changed

docs/source-pytorch/advanced/training_tricks.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ read `this post <https://pytorch.org/blog/pytorch-1.6-now-includes-stochastic-we
7070

7171
----------
7272

73+
.. _batch_size_finder:
74+
7375
*****************
7476
Batch Size Finder
7577
*****************

docs/source-pytorch/upgrade/from_1_4.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
:orphan:
22

3-
.. include:: link_refs.rst
4-
53
Upgrade from 1.4 to the 2.0
64
###########################
75

docs/source-pytorch/upgrade/from_1_5.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
:orphan:
22

3-
.. include:: link_refs.rst
4-
53
Upgrade from 1.5 to the 2.0
64
###########################
75

docs/source-pytorch/upgrade/from_1_6.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
:orphan:
22

3-
.. include:: link_refs.rst
4-
53
Upgrade from 1.6 to the 2.0
64
###########################
75

docs/source-pytorch/upgrade/from_1_7.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
:orphan:
22

3-
.. include:: link_refs.rst
4-
53
Upgrade from 1.7 to the 2.0
64
###########################
75

docs/source-pytorch/upgrade/from_1_8.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
:orphan:
22

3-
.. include:: link_refs.rst
4-
53
Upgrade from 1.8 to the 2.0
64
###########################
75

docs/source-pytorch/upgrade/from_1_9.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
:orphan:
22

3-
.. include:: link_refs.rst
4-
53
Regular User
64
************
75

docs/source-pytorch/upgrade/link_refs.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/source-pytorch/upgrade/sections/1_4_advanced.rst

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,36 @@
88

99
* - called ``ModelCheckpoint.save_function``
1010
- now call ``Trainer.save_checkpoint``
11-
- #7201
11+
- `PR7201`_
1212

1313
* - accessed the ``Trainer.running_sanity_check`` property
1414
- now access the ``Trainer.sanity_checking`` property
15-
- #4945
15+
- `PR4945`_
1616

1717
* - used ``LightningModule.grad_norm``
1818
- now use the ``pl.utilities.grad_norm`` utility function instead
19-
- #7292
19+
- `PR7292`_
2020

2121
* - used ``TrainerTrainingTricksMixin.detect_nan_tensors``
2222
- now use ``pl.utilities.grads.grad_norm``
23-
- #6834
23+
- `PR6834`_
2424

2525
* - used ``TrainerTrainingTricksMixin.print_nan_gradients``
2626
- now use ``pl.utilities.finite_checks.print_nan_gradients``
27-
- #6834
27+
- `PR6834`_
2828

2929
* - If you relied on ``TrainerLoggingMixin.metrics_to_scalars``
3030
- now use ``pl.utilities.metrics.metrics_to_scalars``
31-
- #7180
31+
- `PR7180`_
3232

3333
* - selected the i-th GPU with ``Trainer(gpus="i,j")``
3434
- now this will set the number of GPUs, just like passing ``Trainer(devices=i)``, you can still select the specific GPU by setting the ``CUDA_VISIBLE_DEVICES=i,j`` environment variable
35-
- #6388
35+
- `PR6388`_
36+
37+
38+
.. _pr7201: https://github.com/Lightning-AI/lightning/pull/7201
39+
.. _pr4945: https://github.com/Lightning-AI/lightning/pull/4945
40+
.. _pr7292: https://github.com/Lightning-AI/lightning/pull/7292
41+
.. _pr6834: https://github.com/Lightning-AI/lightning/pull/6834
42+
.. _pr7180: https://github.com/Lightning-AI/lightning/pull/7180
43+
.. _pr6388: https://github.com/Lightning-AI/lightning/pull/6388

docs/source-pytorch/upgrade/sections/1_4_regular.rst

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,52 @@
88

99
* - relied on the ``outputs`` in your ``LightningModule.on_train_epoch_end`` or ``Callback.on_train_epoch_end`` hooks
1010
- rely on either ``on_train_epoch_end`` or set outputs as attributes in your ``LightningModule`` instances and access them from the hook
11-
- #7339
11+
- `PR7339`_
1212

1313
* - accessed ``Trainer.truncated_bptt_steps``
1414
- swicth to manual optimization
15-
- #7323
15+
- `PR7323`_
1616

1717
* - called ``LightningModule.write_predictions`` and ``LightningModule.write_predictions_dict``
1818
- rely on ``predict_step`` and ``Trainer.predict`` + callbacks to write out predictions
19-
- #7066
19+
- `PR7066`_
2020

2121
* - passed the ``period`` argument to the ``ModelCheckpoint`` callback
2222
- pass the ``every_n_epochs`` argument to the ``ModelCheckpoint`` callback
23-
- #6146
23+
- `PR6146`_
2424

2525
* - passed the ``output_filename`` argument to ``Profiler``
2626
- now pass ``dirpath`` and ``filename``, that is ``Profiler(dirpath=...., filename=...)``
27-
- #6621
27+
- `PR6621`_
2828

2929
* - passed the ``profiled_functions`` argument in ``PytorchProfiler``
3030
- now pass the ``record_functions`` argument
31-
- #6349
31+
- `PR6349`_
3232

3333
* - relied on the ``@auto_move_data`` decorator to use the ``LightningModule`` outside of the ``Trainer`` for inference
3434
- use ``Trainer.predict``
35-
- #6993
35+
- `PR6993`_
3636

3737
* - implemented ``on_load_checkpoint`` with a ``checkpoint`` only argument, as in ``Callback.on_load_checkpoint(checkpoint)``
3838
- now update the signature to include ``pl_module`` and ``trainer``, as in ``Callback.on_load_checkpoint(trainer, pl_module, checkpoint)``
39-
- #7253
39+
- `PR7253`_
4040

4141
* - relied on ``pl.metrics``
4242
- now import separate package ``torchmetrics``
43-
- https://torchmetrics.readthedocs.io/en/stable
43+
- `torchmetrics`_
4444

4545
* - accessed ``datamodule`` attribute of ``LightningModule``, that is ``model.datamodule``
4646
- now access ``Trainer.datamodule``, that is ``model.trainer.datamodule``
47-
- #7168
47+
- `PR7168`_
48+
49+
50+
.. _torchmetrics: https://torchmetrics.readthedocs.io/en/stable
51+
.. _pr7339: https://github.com/Lightning-AI/lightning/pull/7339
52+
.. _pr7323: https://github.com/Lightning-AI/lightning/pull/7323
53+
.. _pr7066: https://github.com/Lightning-AI/lightning/pull/7066
54+
.. _pr6146: https://github.com/Lightning-AI/lightning/pull/6146
55+
.. _pr6621: https://github.com/Lightning-AI/lightning/pull/6621
56+
.. _pr6349: https://github.com/Lightning-AI/lightning/pull/6349
57+
.. _pr6993: https://github.com/Lightning-AI/lightning/pull/6993
58+
.. _pr7253: https://github.com/Lightning-AI/lightning/pull/7253
59+
.. _pr7168: https://github.com/Lightning-AI/lightning/pull/7168

0 commit comments

Comments
 (0)