class_docstr: Naive experience buffer class. It stores experience.
  
  Args:
      sample_batch_size (int): Batch size when sampling.
      limit (int, optional): Limit of number of experience samples. A number <= 0 means unlimited. Defaults to 0.
      cpu_offload (bool, optional): Whether to offload experience to cpu when sampling. Defaults to True.
code: def append(self, experience: Experience) -> None:
      if self.cpu_offload:
          experience.to_device(torch.device("cpu"))
      items = split_experience_batch(experience)
      self.items.extend(items)
  
      if self.limit > 0:
          samples_to_remove = len(self.items) - self.limit
          if samples_to_remove > 0:
              warnings.warn(
                  f"Experience buffer is full. Removing {samples_to_remove} samples."
              )
              self.items = self.items[samples_to_remove:]
  
file_path: colossalai/applications/Chat/coati/experience_buffer/naive.py
imports: import random
  import warnings
  from typing import List
  import torch
  from coati.experience_maker.base import Experience
  from .base import ExperienceBuffer
  from .utils import BufferItem, make_experience_batch, split_experience_batch
label_desc: Use image node_id 2 for calling the NaiveExperienceBuffer obj's underlying member method code with example usage: obj.append(experience) without return types