rasa.nlu.persistor
You are viewing documentation for our open source project which is maintained by the community. If you want to get started building assistants with Rasa please check out our latest documentation here.
get_persistor
def get_persistor(name: Text) -> Optional["Persistor"]:
"""Returns an instance of the requested persistor."
Currently, `aws`, `gcs`, `azure` and providing module paths are supported remote storages.
Persistor Objects
class Persistor(abc.ABC):
"""Store models in cloud and fetch them when needed."""
persist
def persist(model_directory: Text, model_name: Text) -> None:
"""Uploads a model persisted in the `target_dir` to cloud storage."""
retrieve
def retrieve(model_name: Text, target_path: Text) -> None:
"""Downloads a model that has been persisted to cloud storage."""
AWSPersistor Objects
class AWSPersistor(Persistor):
"""Store models on S3."
Fetches them when needed, instead of storing them on the local disk.
GCSPersistor Objects
class GCSPersistor(Persistor):
"""Store models on Google Cloud Storage."
Fetches them when needed, instead of storing them on the local disk.
init
def __init__(bucket_name: Text) -> None:
"""Initialise class with client and bucket."""
AzurePersistor Objects
class AzurePersistor(Persistor):
"""Store models on Azure."""