rasa.core.training.structures
Checkpoint Objects
filter_trackers
filter_trackers(trackers: List[DialogueStateTracker]) -> List[DialogueStateTracker]
Filters out all trackers that do not satisfy the conditions.
StoryStep Objects
explicit_events
explicit_events(domain: Domain, should_append_final_listen: bool = True) -> List[Union[Event, List[Event]]]
Returns events contained in the story step including implicit events.
Story Objects
from_events
@staticmethod
from_events(events: List[Event], story_name: Optional[Text] = None) -> "Story"
Create a story from a list of events.
StoryGraph Objects
ordered_steps
ordered_steps() -> List[StoryStep]
Returns the story steps ordered by topological order of the DAG.
cyclic_edges
cyclic_edges() -> List[Tuple[Optional[StoryStep], Optional[StoryStep]]]
Returns the story steps ordered by topological order of the DAG.
overlapping_checkpoint_names
@staticmethod
overlapping_checkpoint_names(cps: List[Checkpoint], other_cps: List[Checkpoint]) -> Set[Text]
Find overlapping checkpoints names.
with_cycles_removed
with_cycles_removed() -> "StoryGraph"
Create a graph with the cyclic edges removed from this graph.
get
get(step_id: Text) -> Optional[StoryStep]
Looks a story step up by its id.
as_story_string
as_story_string() -> Text
Convert the graph into the story file format.
order_steps
@staticmethod
order_steps(story_steps: List[StoryStep]) -> Tuple[deque, List[Tuple[Text, Text]]]
Topological sort of the steps returning the ids of the steps.
topological_sort
@staticmethod
topological_sort(graph: Dict[Text, Set[Text]]) -> Tuple[deque, List[Tuple[Text, Text]]]
Creates a top sort of a directed graph. This is an unstable sorting!
is_empty
is_empty() -> bool
Checks if StoryGraph is empty.