class_docstr: A base class for offloading optimizer states.
  
  Args:
      params: parameters
      defaults (dict): default dict
      nvme_offload_fraction (float, optional): Fraction of params to be offloaded to NVMe. Defaults to 0.0.
      offload_dir (Optional[str], optional): Directory to save NVMe offload files.
          If it's ``None``, a random temporary directory will be used. Defaults to None.
  
  Raises:
      ImportError: Raise if ``tensornvme`` is not installed.
class_docstr_tok: ["A","base","class","for","offloading","optimizer","states",".","Args",":","params",":","parameters","defaults","(","dict",")",":","default","dict","nvme_offload_fraction","(","float",",","optional",")",":","Fraction","of","params","to","be","offloaded","to","NVMe",".","Defaults","to","0.0.","offload_dir","(","Optional","[","str","]",",","optional",")",":","Directory","to","save","NVMe","offload","files",".","If","it","'s","``","None","``",",","a","random","temporary","directory","will","be","used",".","Defaults","to","None",".","Raises",":","ImportError",":","Raise","if","``","tensornvme","``","is","not","installed","."]
code: def __del__(self) -> None:
      if getattr(self, "offloader", None) is not None:
          del self.offloader
          if os.path.exists(self.offload_dir):
              try:
                  os.rmdir(self.offload_dir)
              except OSError:
                  pass
  
file_path: colossalai/colossalai/nn/optimizer/nvme_optimizer.py
imports: import math
  import os
  import tempfile
  from typing import Callable, Dict, List, Optional
  import torch
  from torch.nn.parameter import Parameter
label_desc: Use image node_id 12 for calling the NVMeOptimizer obj's underlying member method code with example usage: obj.__del__() without return types