Skip to content

Spacy nlp method running in multi thread mode by default #2582

@eamonnmag

Description

@eamonnmag

How to reproduce the behaviour

nlp = spacy.load('en_core_web_sm')
array_text = ['Hi there, this is a test' for i in range(0,10000)]
processed = nlp(', '.join(array_text))

This will cause 16 threads on my macbook pro to spin up for Spacy. So is Spacy running in multi-thread mode by default? How do I disable this behaviour? I was under the impression that it would only run in multi-thread mode if I used the nlp.pipe.

Your Environment

  • Operating System: Mac OS High Sierra
  • Python Version Used: 3.6
  • spaCy Version Used: 2.0.3
  • Environment Information:

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation and website

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions