docstr: Initializes reinforcement learning dataset.
  
  Args:
      buffer: replay buffer to become iterable dataset.
  
  Note:
      It's a subclass of pytorch's IterableDataset,
      check https://pytorch.org/docs/stable/data.html#torch.utils.data.IterableDataset
docstr_tok: ["Initializes","reinforcement","learning","dataset",".","Args",":","buffer",":","replay","buffer","to","become","iterable","dataset",".","Note",":","It","'s","a","subclass","of","pytorch","'s","IterableDataset",",","check","https",":","\/\/pytorch.org\/docs\/stable\/data.html","#","torch.utils.data.IterableDataset"]
code: def __init__(self, buffer):
      """Initializes reinforcement learning dataset.
  
      Args:
          buffer: replay buffer to become iterable dataset.
  
      Note:
          It's a subclass of pytorch's IterableDataset,
          check https://pytorch.org/docs/stable/data.html#torch.utils.data.IterableDataset
      """
      self.buffer = buffer
  
file_path: FinRL/finrl/agents/portfolio_optimization/utils.py
imports: from __future__ import annotations
  from collections import deque
  import numpy
  from torch.utils.data.dataset import IterableDataset
label_desc: Use image node_id 1 to create a new RLDataset object from inherited base classes: IterableDataset with example: obj = RLDataset(buffer)