rasa/core/policies/memoization.py
def train(self,
              training_trackers: List[DialogueStateTracker],
              domain: Domain,
              **kwargs: Any
              ) -> None:
        """Trains the policy on given training trackers."""
        self.lookup = {}
        # only considers original trackers (no augmented ones)
        training_trackers = [
            t
            for t in training_trackers
            if not hasattr(t, 'is_augmented') or not t.is_augmented
        ]
        (trackers_as_states,
         trackers_as_actions) = self.featurizer.training_states_and_actions(
            training_trackers, domain)
        self._add_states_to_lookup(trackers_as_states, trackers_as_actions,
                                   domain)
        logger.debug("Memorized {} unique examples."
                     "".format(len(self.lookup)))
Trains the policy on given training trackers.
Trains the policy on given training trackers.
Trains the policy on given training trackers .
def train(self,
              training_trackers: List[DialogueStateTracker],
              domain: Domain,
              **kwargs: Any
              ) -> None:
        self.lookup = {}
        training_trackers = [
            t
            for t in training_trackers
            if not hasattr(t, 'is_augmented') or not t.is_augmented
        ]
        (trackers_as_states,
         trackers_as_actions) = self.featurizer.training_states_and_actions(
            training_trackers, domain)
        self._add_states_to_lookup(trackers_as_states, trackers_as_actions,
                                   domain)
        logger.debug("Memorized {} unique examples."
                     "".format(len(self.lookup)))
def train ( self , training_trackers : List [ DialogueStateTracker ] , domain : Domain , ** kwargs : Any ) -> None : self . lookup = { } training_trackers = [ t for t in training_trackers if not hasattr ( t , 'is_augmented' ) or not t . is_augmented ] ( trackers_as_states , trackers_as_actions ) = self . featurizer . training_states_and_actions ( training_trackers , domain ) self . _add_states_to_lookup ( trackers_as_states , trackers_as_actions , domain ) logger . debug ( "Memorized {} unique examples." "" . format ( len ( self . lookup ) ) )
Trains the policy on given training trackers.
Trains the policy on given training trackers .
"""Trains the policy on given training trackers.""" # only considers original trackers (no augmented ones)
self
training_trackers
List[DialogueStateTracker]
domain
Domain
kwargs
Any