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 _post_state_init(self, param: Parameter) -> None:
      numel = param.storage().size()
      if (
          self.offloader is not None
          and param.device.type == "cpu"
          and numel + self.offloaded_numel <= self.can_offload_numel
      ):
          self.is_on_nvme[param] = True
          self.offloaded_numel += numel
      else:
          self.is_on_nvme[param] = False
  
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 3 for calling the NVMeOptimizer obj's underlying member method code with example usage: obj._post_state_init(param) without return types