code: def __init__(self, ds_config, model_dtype):
      aio_op = AsyncIOBuilder().load(verbose=False)
      self.aio_handle = aio_op.aio_handle
      self.dtype = model_dtype
  
      # set swap buffers, create aio handles
      self._configure_aio(ds_config)
  
      # mapping from param id to path
      self.id_to_path = {}
  
      # mapping from pram_id to buffer id
      self.param_id_to_buffer_id = {}
  
      # mapping from param_id to swap buffer
      self.param_id_to_swap_buffer = {}
  
      # number of elements in the param
      self.param_id_to_numel = {}
  
      self.pending_writes = 0
      self.pending_reads = 0
  
      # keep track of async swap in params and buffers
      self.inflight_params = []
      self.inflight_swap_in_buffers = []
      self.inflight_numel = 0
  
      # keep track of available params
      self.available_params = set()
      self.available_numel = 0
  
      # for swapping out from partitioned fp32 params
      self.partitioned_swap_buffer = None
      self.partitioned_swap_pool = None
  
      self.invalid_buffer = torch.tensor(1).half()
  
      if dist.get_rank() == 0:
          exclude_list = [
              "aio_read_handle",
              "aio_write_handle",
              "buffers",
          ]
          print_object(
              obj=self,
              name="AsyncPartitionedParameterSwapper",
              exclude_list=exclude_list,
          )
  
imports: import os
  import shutil
  from enum import Enum
  import torch
  from deepspeed import comm
  from deepspeed.accelerator import get_accelerator
  from deepspeed.ops.op_builder import AsyncIOBuilder
  from .constants import *
  from .utils import swap_in_tensors, swap_out_tensors, MIN_AIO_BYTES, AIO_ALIGNED_BYTES, print_object, SwapBufferPool
label_desc: Use image node_id 1 to create a new AsyncPartitionedParameterSwapper object from inherited base classes: object with example: obj = AsyncPartitionedParameterSwapper(ds_config, model_dtype)