Skip to content

Commit

Permalink
Add multi-threading note to Language.pipe (resolves #2582) [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
ines committed Sep 12, 2018
1 parent 885691a commit 907df53
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions website/api/language.jade
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 907df53

Please sign in to comment.