Issue while create a custom policy

Could you help me resolve the following issue

raise GraphSchemaValidationException( rasa.engine.exceptions.GraphSchemaValidationException: Node ‘interpreter_provider’ is not part of the graph. Node was expected to be present in the graph as it is used by another component.

Below is my configuration:


language: en


  • name: WhitespaceTokenizer
  • name: CountVectorsFeaturizer
  • name: CountVectorsFeaturizer analyzer: char_wb min_ngram: 1 max_ngram: 4
  • name: DIETClassifier epochs: 100


  • name: MemoizationPolicy
  • name: RulePolicy
  • name: simple_policy.TimeOfDayPolicy

assistant_id: 20240312-130520-quadratic-carp

from rasa.core.policies.policy import Policy from datetime import datetime from import DefaultV1Recipe

@DefaultV1Recipe.register( [DefaultV1Recipe.ComponentType.POLICY_WITHOUT_END_TO_END_SUPPORT], is_trainable=True ) class TimeOfDayPolicy(Policy): def init(self, featurizer=None, priority=None): super(TimeOfDayPolicy, self).init(featurizer=featurizer, priority=priority)

def train(self, training_trackers, domain, interpreter, **kwargs):

def predict_action_probabilities(self, tracker, domain):
    current_time =
    if current_time < datetime.strptime('12:00:00', '%H:%M:%S').time():
        # Morning actions have higher probability
        return {"action_greet": 0.8, "action_default": 0.2}
    elif current_time < datetime.strptime('18:00:00', '%H:%M:%S').time():
        # Afternoon actions have higher probability
        return {"action_default": 0.8, "action_goodbye": 0.2}
        # Evening actions have higher probability
        return {"action_default": 0.6, "action_goodnight": 0.4}

def persist(self, path):