Skip to content

Conversation

@whoisjones
Copy link
Member

functools lru_cache doesn't follow self object's lifetime, thus the memory leak. replaced with methodtools.
closes GH-2013.

@alanakbik
Copy link
Collaborator

@whoisjones thanks for adding this!

@alanakbik alanakbik merged commit 4aa77cb into master Jan 4, 2021
@alanakbik alanakbik deleted the GH-2013-memory-leak-word-embeddings branch January 4, 2021 21:57
@Michael95-m
Copy link

Michael95-m commented Jan 14, 2021

@whoisjones ,did this update affect and fix memory leak in trained sequence tagger models? In my case, when I deployed flair models with flask and uwsgi, memory increases with time. But I'm not very sure this is because of the flair model but I highly suspect this.

@alanakbik
Copy link
Collaborator

Are you running this from master branch? The update was pushed after the last Flair release so if you install from pip you don't yet have it.

@Michael95-m
Copy link

@alanakbik , can I install with pip install git+https://github.com/flairNLP/flair.git to get this fix??

@alanakbik
Copy link
Collaborator

Yes that would work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Memory leak when using WordEmbeddings Class

4 participants