rasa/core/training/generator.py
def _remove_duplicate_story_end_trackers(
        self,
        trackers: List[TrackerWithCachedStates]
    ) -> List[TrackerWithCachedStates]:
        """Removes trackers that reached story end and
            created equal featurizations."""

        # collected trackers that created different featurizations
        unique_trackers = []  # for all steps

        # deduplication of finished trackers is needed,
        # otherwise featurization does a lot of unnecessary work

        for tracker in trackers:
            states = tuple(tracker.past_states(self.domain))
            hashed = hash(states)

            # only continue with trackers that created a
            # hashed_featurization we haven't observed

            if hashed not in self.hashed_featurizations:
                self.hashed_featurizations.add(hashed)
                unique_trackers.append(tracker)

        return unique_trackers
Removes trackers that reached story end and
            created equal featurizations.
Removes trackers that reached story end and
created equal featurizations.
Removes trackers that reached story end and created equal featurizations .
def _remove_duplicate_story_end_trackers(
        self,
        trackers: List[TrackerWithCachedStates]
    ) -> List[TrackerWithCachedStates]:
        unique_trackers = []  
        for tracker in trackers:
            states = tuple(tracker.past_states(self.domain))
            hashed = hash(states)
            if hashed not in self.hashed_featurizations:
                self.hashed_featurizations.add(hashed)
                unique_trackers.append(tracker)
        return unique_trackers
def _remove_duplicate_story_end_trackers ( self , trackers : List [ TrackerWithCachedStates ] ) -> List [ TrackerWithCachedStates ] : unique_trackers = [ ] for tracker in trackers : states = tuple ( tracker . past_states ( self . domain ) ) hashed = hash ( states ) if hashed not in self . hashed_featurizations : self . hashed_featurizations . add ( hashed ) unique_trackers . append ( tracker ) return unique_trackers
Removes trackers that reached story end and
created equal featurizations.
Removes trackers that reached story end and created equal featurizations .
"""Removes trackers that reached story end and
            created equal featurizations.""" # collected trackers that created different featurizations # for all steps # deduplication of finished trackers is needed, # otherwise featurization does a lot of unnecessary work # only continue with trackers that created a # hashed_featurization we haven't observed
self
trackers
List[TrackerWithCachedStates]