How to run a function before training the model?

Nice, I’m able to achieve the intended result by copying the original RASA Training Data Import in and just run the function before running the get_stories function. Considered this topic closed.
On the other notes. I’m using RASA 2.8.1. In the current version 2.8.7 all functions in importers switch from async to normal function so this code might not work for future reader.

async def get_stories(
        self,
        template_variables: Optional[Dict] = None,
        use_e2e: bool = False,
        exclusion_percentage: Optional[int] = None,
    ) -> StoryGraph:
        """update_file_from_db()"""
        return await utils.story_graph_from_paths(
            self._story_files,
            await self.get_domain(),
            template_variables,
            use_e2e,
            exclusion_percentage,
        )
1 Like