mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
Add multi-threading note to Language.pipe (resolves #2582) [ci skip]
This commit is contained in:
parent
885691a7ab
commit
907df53904
|
@ -99,6 +99,12 @@ p
|
|||
| Process texts as a stream, and yield #[code Doc] objects in order.
|
||||
| Supports GIL-free multi-threading.
|
||||
|
||||
+infobox("⚠️", "Important note for spaCy v2.0.x")
|
||||
| By default, multiple threads will be launched for matrix multiplication,
|
||||
| which may be inefficient on multi-core machines. Setting
|
||||
| #[code OPENBLAS_NUM_THREADS=1] should fix this problem. spaCy v2.1.x
|
||||
| will be switching to single-thread by default.
|
||||
|
||||
+aside-code("Example").
|
||||
texts = [u'One document.', u'...', u'Lots of documents']
|
||||
for doc in nlp.pipe(texts, batch_size=50, n_threads=4):
|
||||
|
|
Loading…
Reference in New Issue
Block a user