class_docstr: Base Experience.
  
  Experiences have an index which track the experience's position
  inside the stream for evaluation purposes.
class_docstr_tok: ["Base","Experience",".","Experiences","have","an","index","which","track","the","experience","'s","position","inside","the","stream","for","evaluation","purposes","."]
code: def task_labels(self) -> List[int]:
      task_labels = getattr(self.dataset, "targets_task_labels", None)
  
      assert task_labels is not None, (
          "In its default implementation, DatasetExperience will use the "
          "the dataset `targets_task_labels` field to compute the "
          "content of the `task_label(s)` field. The given does not "
          "contain such field."
      )
  
      return list(set(task_labels))
  
file_path: avalanche/avalanche/benchmarks/scenarios/deprecated/__init__.py
imports: from abc import ABC
  from typing import Generic, List, Optional, Sequence, TypeVar
  from ..None import CLExperience, CLStream, CLScenario
  from typing import TYPE_CHECKING
label_desc: Use image node_id 7 for calling the DatasetExperience obj's underlying member method code with example usage: obj.task_labels() and returns: list