I attached the reference post for these methods. Custom Policy Issue
@classmethod
def load(cls, path: Text) -> "SpellCheckPolicy":
meta = {}
if os.path.exists(path):
meta_path = os.path.join(path, "spellCheck_policy.json")
if os.path.isfile(meta_path):
meta = json.loads(rasa.utils.io.read_file(meta_path))
return cls(**meta)
@staticmethod
def _standard_featurizer() -> None:
return None
def persist(self, path: Text) -> None:
"""Persists the policy to storage."""
config_file = os.path.join(path, "spellCheck_policy.json")
meta = {
"priority": self.priority,
"spell_check_action_name": self.spell_check_action_name,
}
rasa.utils.io.create_directory_for_file(config_file)
rasa.utils.io.dump_obj_as_json_to_file(config_file, meta)