class_docstr: A manager class to manipulate the tensors in chunks.
  
  Args:
      chunk_configuration (Dict[int, Dict]): the configuration dictionary of this chunk manager.
      init_device (torch.device): optional, the device on which the chunk is initialized. The default is None.
class_docstr_tok: ["A","manager","class","to","manipulate","the","tensors","in","chunks",".","Args",":","chunk_configuration","(","Dict","[","int",",","Dict","]",")",":","the","configuration","dictionary","of","this","chunk","manager",".","init_device","(","torch.device",")",":","optional",",","the","device","on","which","the","chunk","is","initialized",".","The","default","is","None","."]
code: def __init__(
      self,
      chunk_configuration,
      init_device: Optional[torch.device] = None,
  ) -> None:
      self.device = init_device or get_current_device()
      self.dp_degree_chunk_size_dict: Dict[int, int] = dict()
      self.kwargs_config = chunk_configuration
      for k, v in self.kwargs_config.items():
          self.dp_degree_chunk_size_dict[k] = v.pop("chunk_size")
          v["init_device"] = self.device
  
      self.chunk_groups: Dict[str, Deque[Chunk]] = dict()
      self.tensor_chunk_map: Dict[torch.Tensor, Chunk] = dict()
      self.accessed_chunks: Set[Chunk] = set()
      self.accessed_mem: int = 0
      self.total_mem: Dict[str, int] = {"cpu": 0, "cuda": 0}
  
imports: from collections import deque
  from typing import Deque, Dict, Iterable, List, Optional, Set, Tuple
  import torch
  import torch.distributed
  from torch.distributed import ProcessGroup
  from colossalai.utils import free_storage, get_current_device
  from .chunk import Chunk, ChunkFullError, TensorState
label_desc: Use image node_id 1 to create a new ChunkManager object  with example: obj = ChunkManager(chunk_configuration, init_device)