Skip to content

Commit 8f9a7d0

Browse files
committed
Modify comment about pickled trackers.
1 parent d648f21 commit 8f9a7d0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

rasa/core/events/__init__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,14 @@ def __init__(
9191

9292
@property
9393
def metadata(self) -> Dict[Text, Any]:
94-
# needed for backwards compatibility <1.0.0 - previously pickled events
95-
# won't have the `_metadata` attribute
94+
# Needed for compatibility for Rasa versions <1.4.0.
95+
# Previous versions of Rasa serialized trackers using the pickle
96+
# module. For the moment, Rasa still supports loading these serialized
97+
# trackers with pickle, but will use JSON in any subsequent save
98+
# operations. Versions of trackers serialized with pickle won't
99+
# include the `_metadata` attribute in their events, so it is necessary
100+
# to define this getter in case the attribute does not exist.
101+
# For more information see CHANGELOG.rst.
96102
return getattr(self, "_metadata", {})
97103

98104
def __ne__(self, other: Any) -> bool:

0 commit comments

Comments
 (0)