Skip to content

Commit

Permalink
reset cache before pickle dump (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yejashi authored Aug 26, 2024
1 parent cfa0b72 commit 29197ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions thicket/thicket.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ def from_pickle(filename, **kwargs):

def to_pickle(self, filename, **kwargs):
"""Write a Thicket to a pickle file."""

# Clear out statsframe to ensure thicket obj is serializable
self.statsframe_ops_cache = {}

pickle.dump(self, open(filename, "wb"), **kwargs)

@staticmethod
Expand Down

0 comments on commit 29197ea

Please sign in to comment.