Skip to content

Commit 5361acd

Browse files
Shorten docstring (for CLI compat) (#19356)
1 parent 6018b07 commit 5361acd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/lightning/pytorch/callbacks/batch_size_finder.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@
3131

3232

3333
class BatchSizeFinder(Callback):
34-
"""The ``BatchSizeFinder`` callback tries to find the largest batch size for a given model that does not give an
35-
out of memory (OOM) error. All you need to do is add it as a callback inside Trainer and call
36-
``trainer.{fit,validate,test,predict}``. Internally it calls the respective step function ``steps_per_trial`` times
37-
for each batch size until one of the batch sizes generates an OOM error.
34+
"""Finds the largest batch size supported by a given model before encountering an out of memory (OOM) error.
35+
36+
All you need to do is add it as a callback inside Trainer and call ``trainer.{fit,validate,test,predict}``.
37+
Internally, it calls the respective step function ``steps_per_trial`` times for each batch size until one
38+
of the batch sizes generates an OOM error.
3839
3940
.. warning:: This is an :ref:`experimental <versioning:Experimental API>` feature.
4041

0 commit comments

Comments
 (0)