stanza icon indicating copy to clipboard operation
stanza copied to clipboard

Stanza is not ThreadSafe like Spacy?

Open singhkumaranuj opened this issue 2 years ago • 1 comments

What I came to know that : Stanza does not work with multiple async workers if they are accessing the same model.

Is there any way to handle this ? Or Am I missing any point here ?

singhkumaranuj avatar Nov 28 '23 06:11 singhkumaranuj

There really hasn't been much effort put into making it thread safe, but at the same time I'm not sure we'd get a lot of benefit from even trying. Pytorch will use up the GPU in just one thread if available, or fork a bunch on the CPU if there is no GPU

AngledLuffa avatar Nov 28 '23 06:11 AngledLuffa