Skip to content

Commit

Permalink
Shorten docstring (for CLI compat) (#19356)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathematicalmichael authored Jan 30, 2024
1 parent 6018b07 commit 5361acd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/lightning/pytorch/callbacks/batch_size_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@


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

0 comments on commit 5361acd

Please sign in to comment.