-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
langchain[patch]: Fix memory issue for large number of child chunks on large documents #5989
langchain[patch]: Fix memory issue for large number of child chunks on large documents #5989
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
} | ||
if (addToDocstore) { | ||
await this.docstore.mset(Object.entries(fullDocs)); | ||
await this._storeDocuments(parentDoc, taggedSubDocs, addToDocstore); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flagging that this does make it a bit more likely that we'll get into half-finished states
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
* Fix memory issue for large number of chunks on large documents * Format --------- Co-authored-by: Clemens Peters <[email protected]>
Couldn't push to your branch so merged in #6012 after running |
Fixes OOM issues. The docker container of our index manager is killed on specific documents after using more than 2GB of memory. For large documents the ParentDocumentRetriever can create lots of parent and child documents.
While this change seems to fix the memory issues, I'm still investigating another issue on the same large document at the moment:
Uncaught exception: error: terminating connection due to idle-session timeout
.@PetersClemens