docstr: Test cuda OOM error detection.
docstr_tok: ["Test","cuda","OOM","error","detection","."]
code: def test_is_out_of_cuda_memory(self) -> None:
      """Test cuda OOM error detection."""
      cuda_oom_error_1 = RuntimeError(
          "CUDA out of memory. Tried to allocate ..."
      )
      self.assertTrue(is_out_of_cuda_memory(cuda_oom_error_1))
      cuda_oom_error_2 = RuntimeError(
          "RuntimeError: cuda runtime error (2) : out of memory"
      )
      self.assertTrue(is_out_of_cuda_memory(cuda_oom_error_2))
      not_cuda_oom_error = RuntimeError("RuntimeError: blah")
      self.assertFalse(is_out_of_cuda_memory(not_cuda_oom_error))
  
file_path: tnt/tests/utils/test_oom.py
imports: import os
  import tempfile
  import unittest
  import torch
  from torchtnt.utils.device import get_device_from_env
  from torchtnt.utils.oom import _bytes_to_mb_gb, is_out_of_cpu_memory, is_out_of_cuda_memory, is_out_of_memory_error, log_memory_snapshot
  from torchtnt.utils.version import is_torch_version_geq_2_0
label_desc: Use image node_id 2 for calling the OomTest obj's underlying member method code with example usage: obj.test_is_out_of_cuda_memory() without return types