-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Memory leak with beam_parse method #4432
Comments
Thanks for the report and test case! Have you also seen the discussion in #3618? I suspect this is the same bug. The current (obviously not very satisfactory) work-around is to periodically reload
Hopefully we'll be able to track this down soon... |
Thanks for your quick answer ! I have already seen most of these posts, unfortunately :
For information, our current patch is to disable NER confidence computation, and we will re-wire it whenever a bug fix is released. |
@honnibal: It might not be the whole story, but I think this is one spot with an obvious memory leak related to beam_parse: spaCy/spacy/syntax/transition_system.pyx Lines 28 to 30 in 7772d5d
valgrind reports ~8MB lost per It's called here and never deleted: |
Okay, so this is a separate issue from #3618 just related to |
Hey, is this fix going to be relfected in the release of v2.2.4 or is it already in v2.2.3? |
Hi, this isn't in v2.2.3, sorry. It should be fixed in an upcoming release, but there isn't a concrete version number or release date set yet. If you need this in the meanwhile, you can compile the |
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. |
How to reproduce the behaviour
We are currently trying to obtain a confidence score for entities found with NER. In order to do so, we implement the solution that was suggested in these places :
The code is performing well for the functionality, but unfortunately implies a memory leak, as suggested by @usamec in the thread #881 . The first code was produced for SpaCy 2.0 and we first thought that it might have been corrected in newest releases, so we perform tests with version 2.2 but with same results.
Here is the code used to highlight the memory leak :
The result is a linear curve with a 250 Mb increase of memory usage that is never released (see attachment). Tested with thousands of documents, we eventually crashed our server.
Another question comes with this bug :
Your Environment
The text was updated successfully, but these errors were encountered: