rasa/core/training/generator.py
def _process_step(
        self,
        step: StoryStep,
        incoming_trackers: List[TrackerWithCachedStates]
    ) -> TrackersTuple:
        """Processes a steps events with all trackers.

        The trackers that reached the steps starting checkpoint will
        be used to process the events. Collects and returns training
        data while processing the story step."""

        events = step.explicit_events(self.domain)

        trackers = []
        if events:  # small optimization

            # need to copy the tracker as multiple story steps
            # might start with the same checkpoint and all of them
            # will use the same set of incoming trackers

            for tracker in incoming_trackers:
                # sender id is used to be able for a human to see where the
                # messages and events for this tracker came from - to do this
                # we concatenate the story block names of the blocks that
                # contribute to the trackers events
                if tracker.sender_id:
                    if step.block_name not in tracker.sender_id.split(" > "):
                        new_sender = (tracker.sender_id +
                                      " > " + step.block_name)
                    else:
                        new_sender = tracker.sender_id
                else:
                    new_sender = step.block_name
                trackers.append(tracker.copy(new_sender))

        end_trackers = []
        for event in events:
            for tracker in trackers:
                if isinstance(event, (ActionReverted,
                                      UserUtteranceReverted,
                                      Restarted)):
                    end_trackers.append(tracker.copy(tracker.sender_id))
                tracker.update(event)

        # end trackers should be returned separately
        # to avoid using them for augmentation
        return trackers, end_trackers
Processes a steps events with all trackers.

        The trackers that reached the steps starting checkpoint will
        be used to process the events. Collects and returns training
        data while processing the story step.
Processes a steps events with all trackers.
The trackers that reached the steps starting checkpoint will
be used to process the events. Collects and returns training
data while processing the story step.
Processes a steps events with all trackers . The trackers that reached the steps starting checkpoint will be used to process the events . Collects and returns training data while processing the story step .
def _process_step(
        self,
        step: StoryStep,
        incoming_trackers: List[TrackerWithCachedStates]
    ) -> TrackersTuple:
        events = step.explicit_events(self.domain)
        trackers = []
        if events:  
            for tracker in incoming_trackers:
                if tracker.sender_id:
                    if step.block_name not in tracker.sender_id.split(" > "):
                        new_sender = (tracker.sender_id +
                                      " > " + step.block_name)
                    else:
                        new_sender = tracker.sender_id
                else:
                    new_sender = step.block_name
                trackers.append(tracker.copy(new_sender))
        end_trackers = []
        for event in events:
            for tracker in trackers:
                if isinstance(event, (ActionReverted,
                                      UserUtteranceReverted,
                                      Restarted)):
                    end_trackers.append(tracker.copy(tracker.sender_id))
                tracker.update(event)
        return trackers, end_trackers
def _process_step ( self , step : StoryStep , incoming_trackers : List [ TrackerWithCachedStates ] ) -> TrackersTuple : events = step . explicit_events ( self . domain ) trackers = [ ] if events : for tracker in incoming_trackers : if tracker . sender_id : if step . block_name not in tracker . sender_id . split ( " > " ) : new_sender = ( tracker . sender_id + " > " + step . block_name ) else : new_sender = tracker . sender_id else : new_sender = step . block_name trackers . append ( tracker . copy ( new_sender ) ) end_trackers = [ ] for event in events : for tracker in trackers : if isinstance ( event , ( ActionReverted , UserUtteranceReverted , Restarted ) ) : end_trackers . append ( tracker . copy ( tracker . sender_id ) ) tracker . update ( event ) return trackers , end_trackers
Processes a steps events with all trackers.
Processes a steps events with all trackers .
"""Processes a steps events with all trackers.

        The trackers that reached the steps starting checkpoint will
        be used to process the events. Collects and returns training
        data while processing the story step.""" # small optimization # need to copy the tracker as multiple story steps # might start with the same checkpoint and all of them # will use the same set of incoming trackers # sender id is used to be able for a human to see where the # messages and events for this tracker came from - to do this # we concatenate the story block names of the blocks that # contribute to the trackers events # end trackers should be returned separately # to avoid using them for augmentation
self
step
StoryStep
incoming_trackers
List[TrackerWithCachedStates]