From 5361acdccacb453132367c489c76bffa65c2c9c3 Mon Sep 17 00:00:00 2001 From: "Michael Pilosov, PhD" <40366263+mathematicalmichael@users.noreply.github.com> Date: Tue, 30 Jan 2024 00:11:51 -0700 Subject: [PATCH] Shorten docstring (for CLI compat) (#19356) --- src/lightning/pytorch/callbacks/batch_size_finder.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lightning/pytorch/callbacks/batch_size_finder.py b/src/lightning/pytorch/callbacks/batch_size_finder.py index c95803c035db0..e348f4946e51b 100644 --- a/src/lightning/pytorch/callbacks/batch_size_finder.py +++ b/src/lightning/pytorch/callbacks/batch_size_finder.py @@ -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 ` feature.