From 907df53904a9cf5a29df5e400ba8e9045e45d468 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Wed, 12 Sep 2018 15:03:30 +0200 Subject: [PATCH] Add multi-threading note to Language.pipe (resolves #2582) [ci skip] --- website/api/language.jade | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/website/api/language.jade b/website/api/language.jade index a04650dc9f1..e933327df27 100644 --- a/website/api/language.jade +++ b/website/api/language.jade @@ -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):