This is unreleased documentation for Rasa Documentation Main/Unreleased version.
For the latest released documentation, see the latest version (3.x).

Version: Main/Unreleased

Resource Objects

class Resource()

Represents a persisted graph component in the graph.


  • name - The unique identifier for the Resource. Used to locate the associated data from a ModelStorage. Normally matches the name of the node which created it.
  • output_fingerprint - An unique identifier for a specific instantiation of a Resource. Used to distinguish a specific persistence for the same Resource when saving to the cache.


def from_cache(cls, node_name: Text, directory: Path,
model_storage: ModelStorage,
output_fingerprint: Text) -> Resource

Loads a Resource from the cache.

This automatically loads the persisted resource into the given ModelStorage.


  • node_name - The node name of the Resource.
  • directory - The directory with the cached Resource.
  • model_storage - The ModelStorage which the cached Resource will be added to so that the Resource is accessible for other graph nodes.
  • ModelStorage0 - The fingerprint of the cached Resource.


The ready-to-use and accessible Resource.


def to_cache(directory: Path, model_storage: ModelStorage) -> None

Persists the Resource to the cache.


  • directory - The directory which receives the persisted Resource.
  • model_storage - The model storage which currently contains the persisted Resource.


def fingerprint() -> Text

Provides fingerprint for Resource.

A unique fingerprint is created on initialization of a Resource however we also allow a value to be provided for when we retrieve a Resource from the cache (see Resource.from_cache).


Fingerprint for Resource.