rasa/core/training/generator.py
def _issue_unused_checkpoint_notification(
        self,
        unused_checkpoints: Set[Text]
    ) -> None:
        """Warns about unused story blocks.

        Unused steps are ones having a start or end checkpoint
        that no one provided."""

        if STORY_START in unused_checkpoints:
            logger.warning("There is no starting story block "
                           "in the training data. "
                           "All your story blocks start with some checkpoint. "
                           "There should be at least one story block "
                           "that starts without any checkpoint.")

        # running through the steps first will result in only one warning
        # per block (as one block might have multiple steps)
        collected_start = set()
        collected_end = set()
        for step in self.story_graph.story_steps:
            for start in step.start_checkpoints:
                if start.name in unused_checkpoints:
                    # After processing, there shouldn't be a story part left.
                    # This indicates a start checkpoint that doesn't exist
                    collected_start.add((start.name, step.block_name))

            for end in step.end_checkpoints:
                if end.name in unused_checkpoints:
                    # After processing, there shouldn't be a story part left.
                    # This indicates an end checkpoint that doesn't exist
                    collected_end.add((end.name, step.block_name))

        for cp, block_name in collected_start:
            if not cp.startswith(GENERATED_CHECKPOINT_PREFIX):
                logger.warning("Unsatisfied start checkpoint '{}' "
                               "in block '{}'. "
                               "Remove this checkpoint or add "
                               "story blocks that end "
                               "with this checkpoint.".format(cp, block_name))

        for cp, block_name in collected_end:
            if not cp.startswith(GENERATED_CHECKPOINT_PREFIX):
                logger.warning("Unsatisfied end checkpoint '{}' "
                               "in block '{}'. "
                               "Remove this checkpoint or add "
                               "story blocks that start "
                               "with this checkpoint.".format(cp, block_name))
Warns about unused story blocks.

        Unused steps are ones having a start or end checkpoint
        that no one provided.
Warns about unused story blocks.
Unused steps are ones having a start or end checkpoint
that no one provided.
Warns about unused story blocks . Unused steps are ones having a start or end checkpoint that no one provided .
def _issue_unused_checkpoint_notification(
        self,
        unused_checkpoints: Set[Text]
    ) -> None:
        if STORY_START in unused_checkpoints:
            logger.warning("There is no starting story block "
                           "in the training data. "
                           "All your story blocks start with some checkpoint. "
                           "There should be at least one story block "
                           "that starts without any checkpoint.")
        collected_start = set()
        collected_end = set()
        for step in self.story_graph.story_steps:
            for start in step.start_checkpoints:
                if start.name in unused_checkpoints:
                    collected_start.add((start.name, step.block_name))
            for end in step.end_checkpoints:
                if end.name in unused_checkpoints:
                    collected_end.add((end.name, step.block_name))
        for cp, block_name in collected_start:
            if not cp.startswith(GENERATED_CHECKPOINT_PREFIX):
                logger.warning("Unsatisfied start checkpoint '{}' "
                               "in block '{}'. "
                               "Remove this checkpoint or add "
                               "story blocks that end "
                               "with this checkpoint.".format(cp, block_name))
        for cp, block_name in collected_end:
            if not cp.startswith(GENERATED_CHECKPOINT_PREFIX):
                logger.warning("Unsatisfied end checkpoint '{}' "
                               "in block '{}'. "
                               "Remove this checkpoint or add "
                               "story blocks that start "
                               "with this checkpoint.".format(cp, block_name))
def _issue_unused_checkpoint_notification ( self , unused_checkpoints : Set [ Text ] ) -> None : if STORY_START in unused_checkpoints : logger . warning ( "There is no starting story block " "in the training data. " "All your story blocks start with some checkpoint. " "There should be at least one story block " "that starts without any checkpoint." ) collected_start = set ( ) collected_end = set ( ) for step in self . story_graph . story_steps : for start in step . start_checkpoints : if start . name in unused_checkpoints : collected_start . add ( ( start . name , step . block_name ) ) for end in step . end_checkpoints : if end . name in unused_checkpoints : collected_end . add ( ( end . name , step . block_name ) ) for cp , block_name in collected_start : if not cp . startswith ( GENERATED_CHECKPOINT_PREFIX ) : logger . warning ( "Unsatisfied start checkpoint '{}' " "in block '{}'. " "Remove this checkpoint or add " "story blocks that end " "with this checkpoint." . format ( cp , block_name ) ) for cp , block_name in collected_end : if not cp . startswith ( GENERATED_CHECKPOINT_PREFIX ) : logger . warning ( "Unsatisfied end checkpoint '{}' " "in block '{}'. " "Remove this checkpoint or add " "story blocks that start " "with this checkpoint." . format ( cp , block_name ) )
Warns about unused story blocks.
Warns about unused story blocks .
"""Warns about unused story blocks.

        Unused steps are ones having a start or end checkpoint
        that no one provided.""" # running through the steps first will result in only one warning # per block (as one block might have multiple steps) # After processing, there shouldn't be a story part left. # This indicates a start checkpoint that doesn't exist # After processing, there shouldn't be a story part left. # This indicates an end checkpoint that doesn't exist
self
unused_checkpoints
Set[Text]