rasa/core/policies/memoization.py
def _recall_using_delorean(self, old_states, tracker, domain):
        """Recursively go to the past to correctly forget slots,
            and then back to the future to recall."""

        logger.debug("Launch DeLorean...")
        mcfly_tracker = self._back_to_the_future_again(tracker)
        while mcfly_tracker is not None:
            tracker_as_states = self.featurizer.prediction_states(
                [mcfly_tracker], domain)
            states = tracker_as_states[0]

            if old_states != states:
                # check if we like new futures
                memorised = self._recall_states(states)
                if memorised is not None:
                    logger.debug("Current tracker state {}".format(states))
                    return memorised
                old_states = states

            # go back again
            mcfly_tracker = self._back_to_the_future_again(mcfly_tracker)

        # No match found
        logger.debug("Current tracker state {}".format(old_states))
        return None
Recursively go to the past to correctly forget slots,
            and then back to the future to recall.
Recursively go to the past to correctly forget slots,
and then back to the future to recall.
Recursively go to the past to correctly forget slots and then back to the future to recall .
def _recall_using_delorean(self, old_states, tracker, domain):
        logger.debug("Launch DeLorean...")
        mcfly_tracker = self._back_to_the_future_again(tracker)
        while mcfly_tracker is not None:
            tracker_as_states = self.featurizer.prediction_states(
                [mcfly_tracker], domain)
            states = tracker_as_states[0]
            if old_states != states:
                memorised = self._recall_states(states)
                if memorised is not None:
                    logger.debug("Current tracker state {}".format(states))
                    return memorised
                old_states = states
            mcfly_tracker = self._back_to_the_future_again(mcfly_tracker)
        logger.debug("Current tracker state {}".format(old_states))
        return None
def _recall_using_delorean ( self , old_states , tracker , domain ) : logger . debug ( "Launch DeLorean..." ) mcfly_tracker = self . _back_to_the_future_again ( tracker ) while mcfly_tracker is not None : tracker_as_states = self . featurizer . prediction_states ( [ mcfly_tracker ] , domain ) states = tracker_as_states [ 0 ] if old_states != states : memorised = self . _recall_states ( states ) if memorised is not None : logger . debug ( "Current tracker state {}" . format ( states ) ) return memorised old_states = states mcfly_tracker = self . _back_to_the_future_again ( mcfly_tracker ) logger . debug ( "Current tracker state {}" . format ( old_states ) ) return None
Recursively go to the past to correctly forget slots,
and then back to the future to recall.
Recursively go to the past to correctly forget slots and then back to the future to recall .
"""Recursively go to the past to correctly forget slots,
            and then back to the future to recall.""" # check if we like new futures # go back again # No match found
self
old_states
tracker
domain