class_docstr: Represents a wrapper over a `TrackerStore` with a configurable access pattern.
class_docstr_tok: ["Represents","a","wrapper","over","a","`","TrackerStore","`","with","a","configurable","access","pattern","."]
docstr: Creates a MarkerTrackerLoader.
  
  Args:
      tracker_store: The underlying tracker store to access.
      strategy: The strategy to use for selecting trackers,
                can be 'all', 'sample_n', or 'first_n'.
      count: Number of trackers to return, can only be None if strategy is 'all'.
      seed: Optional seed to set up random number generator,
            only useful if strategy is 'sample_n'.
docstr_tok: ["Creates","a","MarkerTrackerLoader",".","Args",":","tracker_store",":","The","underlying","tracker","store","to","access",".","strategy",":","The","strategy","to","use","for","selecting","trackers",",","can","be","'all","'",",","'sample_n","'",",","or","'first_n","'",".","count",":","Number","of","trackers","to","return",",","can","only","be","None","if","strategy","is","'all","'",".","seed",":","Optional","seed","to","set","up","random","number","generator",",","only","useful","if","strategy","is","'sample_n","'","."]
code: def __init__(
      self,
      tracker_store: TrackerStore,
      strategy: str,
      count: Optional[int] = None,
      seed: Any = None,
  ) -> None:
      """Creates a MarkerTrackerLoader.
  
      Args:
          tracker_store: The underlying tracker store to access.
          strategy: The strategy to use for selecting trackers,
                    can be 'all', 'sample_n', or 'first_n'.
          count: Number of trackers to return, can only be None if strategy is 'all'.
          seed: Optional seed to set up random number generator,
                only useful if strategy is 'sample_n'.
      """
      self.tracker_store = tracker_store
  
      if strategy not in MarkerTrackerLoader._STRATEGY_MAP:
          raise RasaException(
              f"Invalid strategy for loading markers - '{strategy}' was given, \
                  options 'all', 'sample_n', or 'first_n' exist."
          )
  
      self.strategy = MarkerTrackerLoader._STRATEGY_MAP[strategy]
  
      if strategy != STRATEGY_ALL:
          if not count:
              raise RasaException(
                  f"Desired tracker count must be given for strategy '{strategy}'."
              )
  
          if count < 1:
              # If count is ever < 1, user has an error, so issue exception
              raise RasaException(
                  "Parameter 'count' must be greater than 0."
              )
  
      self.count = count
  
      if count and strategy == STRATEGY_ALL:
          rasa.shared.utils.io.raise_warning(
              "Parameter 'count' is ignored by strategy 'all'."
          )
          self.count = None
  
      if seed:
          if strategy == STRATEGY_SAMPLE_N:
              random.seed(seed)
          else:
              rasa.shared.utils.io.raise_warning(
                  f"Parameter 'seed' is ignored by strategy '{strategy}'."
              )
  
file_path: rasa/rasa/core/evaluation/marker_tracker_loader.py
imports: import random
  from rasa.shared.exceptions import RasaException
  from rasa.shared.core.trackers import DialogueStateTracker
  from typing import Any, Iterable, List, Text, Optional, AsyncIterator
  from rasa.core.tracker_store import TrackerStore
  import rasa.shared.utils.io
label_desc: Use image node_id 1 to create a new MarkerTrackerLoader object  with example: obj = MarkerTrackerLoader(tracker_store, strategy, count, seed)