Skip to content
Quantoros

Why can retrying with a smaller batch inside an OOM except block still fail?

GPU / CUDALevel: AdvancedOOM recovery and exception frames

Why can retrying with a smaller batch inside an OOM except block still fail?

Hints
  • What objects can an exception traceback retain?
  • Separate error capture from the retry's execution scope.

Answer

This answer is part of mentoring

Advanced questions come with a full breakdown and a mock interview with a working quant researcher. The first call is free.

Source and licence: PyTorch contributors — FAQ · BSD-3-Clause · answer: Quantoros editorial

Related questions