Skip to content

Commit 4605e8a

Browse files
aslisabanciBorda
andauthored
Add missing highlighting for Python snippets (#8411)
Co-authored-by: Jirka Borovec <[email protected]>
1 parent d90cb7f commit 4605e8a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

docs/source/common/trainer.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ auto_scale_batch_size
335335
Automatically tries to find the largest batch size that fits into memory,
336336
before any training.
337337

338-
.. code-block::
338+
.. code-block:: python
339339
340340
# default used by the Trainer (no scaling of batch size)
341341
trainer = Trainer(auto_scale_batch_size=None)
@@ -1353,7 +1353,6 @@ By setting to False, you have to add your own distributed sampler:
13531353

13541354
.. code-block:: python
13551355
1356-
13571356
# in your LightningModule or LightningDataModule
13581357
def train_dataloader(self):
13591358
# default used by the Trainer
@@ -1575,7 +1574,7 @@ Can specify as float or int.
15751574
trainer = Trainer(val_check_interval=1000)
15761575

15771576

1578-
.. code-block::
1577+
.. code-block:: python
15791578
15801579
# Here is the computation to estimate the total number of batches seen within an epoch.
15811580

0 commit comments

Comments
 (0)