rasa/core/policies/policy.py
def _training_data_for_continue_training(
        self,
        batch_size: int,
        training_trackers: List[DialogueStateTracker],
        domain: Domain
    ) -> DialogueTrainingData:
        """Creates training_data for `continue_training` by
            taking the new labelled example training_trackers[-1:]
            and inserting it in batch_size-1 parts of the old training data,
        """
        import numpy as np

        num_samples = batch_size - 1
        num_prev_examples = len(training_trackers) - 1

        sampled_idx = np.random.choice(range(num_prev_examples),
                                       replace=False,
                                       size=min(num_samples,
                                                num_prev_examples))
        trackers = [training_trackers[i]
                    for i in sampled_idx] + training_trackers[-1:]
        return self.featurize_for_training(trackers, domain)
Creates training_data for `continue_training` by
            taking the new labelled example training_trackers[-1:]
            and inserting it in batch_size-1 parts of the old training data,
        
Creates training_data for `continue_training` by
taking the new labelled example training_trackers[-1:]
and inserting it in batch_size-1 parts of the old training data.
Creates training_data for ` continue_training ` by taking the new labelled example training_trackers [ - 1 : ] and inserting it in batch_size - 1 parts of the old training data .
def _training_data_for_continue_training(
        self,
        batch_size: int,
        training_trackers: List[DialogueStateTracker],
        domain: Domain
    ) -> DialogueTrainingData:
        import numpy as np
        num_samples = batch_size - 1
        num_prev_examples = len(training_trackers) - 1
        sampled_idx = np.random.choice(range(num_prev_examples),
                                       replace=False,
                                       size=min(num_samples,
                                                num_prev_examples))
        trackers = [training_trackers[i]
                    for i in sampled_idx] + training_trackers[-1:]
        return self.featurize_for_training(trackers, domain)
def _training_data_for_continue_training ( self , batch_size : int , training_trackers : List [ DialogueStateTracker ] , domain : Domain ) -> DialogueTrainingData : import numpy as np num_samples = batch_size - 1 num_prev_examples = len ( training_trackers ) - 1 sampled_idx = np . random . choice ( range ( num_prev_examples ) , replace = False , size = min ( num_samples , num_prev_examples ) ) trackers = [ training_trackers [ i ] for i in sampled_idx ] + training_trackers [ - 1 : ] return self . featurize_for_training ( trackers , domain )
Creates training_data for `continue_training` by
taking the new labelled example training_trackers[-1:]
and inserting it in batch_size-1 parts of the old training data,
Creates training_data for ` continue_training ` by taking the new labelled example training_trackers [ - 1 : ] and inserting it in batch_size - 1 parts of the old training data
"""Creates training_data for `continue_training` by
            taking the new labelled example training_trackers[-1:]
            and inserting it in batch_size-1 parts of the old training data,
        """
self
batch_size
int
training_trackers
List[DialogueStateTracker]
domain
Domain