nlp.pipe does not work multithreaded on OSX M1 #12588
-
How to reproduce the behaviourIt looks like Here is the code: # script/spacy_demo.py
import spacy
texts = ["foo", "bar", "baz"]
nlp = spacy.load("en_core_web_sm")
list(nlp.pipe(texts, n_process=2)) Running it provides this:
Your Environment
Additional InformationThe same issue occurs in Python 3.11 on M1 OSX, installed via pip instead of poetry. Documented here: https://github.com/tianhuil/pip-spacy |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The error message is a bit hard to understand, but it's trying to show you how you need to modify your script for use with multiprocessing:
If you search for this error message you can find lots of examples on StackOverflow, etc. |
Beta Was this translation helpful? Give feedback.
The error message is a bit hard to understand, but it's trying to show you how you need to modify your script for use with multiprocessing: