Skip to content
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

High memory usage when deserializing Docs #992

Closed
tbsflk opened this issue Apr 19, 2017 · 2 comments
Closed

High memory usage when deserializing Docs #992

tbsflk opened this issue Apr 19, 2017 · 2 comments

Comments

@tbsflk
Copy link

tbsflk commented Apr 19, 2017

I have quite a lot of data which I want to process with spacy and then serialize for later usage.

Since I haven't found any documentation on how to save and reload processed Doc objects, I'm using the approach in this issue relying on to_bytes and from_bytes: #636

However, although my pickle-serialzed object (list of byte-encoded Docs) is only around 70MB, deseralizing that (turning each element of the list into a Doc.from_bytes(...)) needs a lot of memory (100% of the 6GB on my virtual machine).

Any idea why that is happening?
Am I doing something wrong with the vocab? Should I reload the one I also serialized (nlp.vocab.dump) or should I use a fresh one (spacy.load('en')) when creating the new Doc objects?

@tbsflk
Copy link
Author

tbsflk commented Apr 20, 2017

Found the reason for this behavior, looks like it is not a spacy issue.

@lock
Copy link

lock bot commented May 8, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant