Skip to content

Commit

Permalink
Remove remnant of Pydantic's state in getstate (#8902)
Browse files Browse the repository at this point in the history
  • Loading branch information
trducng authored Nov 14, 2023
1 parent 9c45e36 commit e717f4c
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 e717f4c

Please sign in to comment.