Skip to content

Commit

Permalink
Remove remnant of Pydantic's state in getstate (run-llama#8902)
Browse files Browse the repository at this point in the history
  • Loading branch information
trducng authored and Ryan Peach committed Feb 7, 2024
1 parent 36384dc commit b2ad171
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llama_index/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def __getstate__(self) -> Dict[str, Any]:
state = self.dict()

# Remove common unpicklable entries
state["__dict__"].pop("tokenizer", None)
state["__dict__"].pop("tokenizer_fn", None)
state.pop("tokenizer", None)
state.pop("tokenizer_fn", None)
return state

def __setstate__(self, state: Dict[str, Any]) -> None:
Expand Down

0 comments on commit b2ad171

Please sign in to comment.