class_docstr: A CL stream is a named iterator of experiences.
  
  In general, many streams may be generator and not explicit lists to avoid
  keeping many objects in memory.
  
  NOTE: streams should not be used by training strategies since they
  provide access to past, current, and future data.
class_docstr_tok: ["A","CL","stream","is","a","named","iterator","of","experiences",".","In","general",",","many","streams","may","be","generator","and","not","explicit","lists","to","avoid","keeping","many","objects","in","memory",".","NOTE",":","streams","should","not","be","used","by","training","strategies","since","they","provide","access","to","past",",","current",",","and","future","data","."]
docstr: Creates an instance of a experience stream.
  
  :param name: The name of the stream.
  :param exps_iter: The iterable from which experiences will be obtained.
  :param benchmark: The benchmarks defining this stream.
  :param set_stream_info: If True, will set the `current_experience` and
      `origin_stream` fields on experience objects before returning them.
      Defaults to True.
docstr_tok: ["Creates","an","instance","of","a","experience","stream",".",":","param","name",":","The","name","of","the","stream",".",":","param","exps_iter",":","The","iterable","from","which","experiences","will","be","obtained",".",":","param","benchmark",":","The","benchmarks","defining","this","stream",".",":","param","set_stream_info",":","If","True",",","will","set","the","`","current_experience","`","and","`","origin_stream","`","fields","on","experience","objects","before","returning","them",".","Defaults","to","True","."]
code: def __init__(
      self: TCLStream,
      name: str,
      exps_iter: Iterable[TCLExperience],
      benchmark: "Optional[CLScenario[TCLStream]]" = None,
      set_stream_info: bool = True,
  ):
      """
      Creates an instance of a experience stream.
  
      :param name: The name of the stream.
      :param exps_iter: The iterable from which experiences will be obtained.
      :param benchmark: The benchmarks defining this stream.
      :param set_stream_info: If True, will set the `current_experience` and
          `origin_stream` fields on experience objects before returning them.
          Defaults to True.
      """
      self.name: str = name
      """
          The name of the stream (for instance: "train", "test", "valid", ...).
          """
  
      self.exps_iter: Iterable[TCLExperience] = exps_iter
      """
          The iterable from which experiences will be obtained.
          """
  
      self.benchmark: "CLScenario[TCLStream]" = benchmark
      """
          A reference to the benchmark.
          """
  
      self.set_stream_info: bool = set_stream_info
      """
          If True, will set the `current_experience` and `origin_stream` 
          fields on experience objects before returning them.
          """
  
      if isinstance(self.exps_iter, GeneratorType):
          # Prevent issues when iterating the stream more than once
          self.exps_iter = GeneratorMemo(self.exps_iter)
  
imports: from abc import abstractmethod, ABC
  from contextlib import contextmanager
  from copy import copy
  from enum import Enum
  from types import GeneratorType
  from typing import Any, Dict, Generator, Iterator, List, Iterable, Optional, Sequence, Tuple, TypeVar, Union, Generic, overload
  from typing_extensions import final
  import numpy
  from avalanche.benchmarks.utils.dataset_utils import slice_alike_object_to_indices
label_desc: Use image node_id 1 to create a new CLStream object from inherited base classes: Generic with example: obj = CLStream(name, exps_iter, benchmark, set_stream_info)