v3.7.0: Trained pipelines using Curated Transformers and support for Python 3.12
This release drops support for Python 3.6 and adds support for Python 3.12.
β¨ New features and improvements
- Add support for Python 3.12 (#12979).
- Use the new library Weasel for spaCy projects functionality (#12769).
- All
spacy project
commands should run as before, just now they're using Weasel under the hood. β οΈ Remote storage is not yet supported for Python 3.12. Use Python 3.11 or earlier for remote storage.
- All
- Extend to Thinc v8.2 (#12897).
- Extend
transformers
extra tospacy-transformers
v1.3 (#13025). - Support registered vectors (#12492).
- Add
--spans-key
option for CLI evaluation withspacy benchmark accuracy
(#12981). - Load the CLI module lazily for
spacy.info
(#12962). - Add type stubs for
spacy.training.example
(#12801). - Warn for unsupported pattern keys in dependency matcher (#12928).
Language.replace_listeners
: Pass the replaced listener and thetok2vec
pipe to the callback in order to supportspacy-curated-transformers
(#12785).- Always use
tqdm
withdisable=None
to disable output in non-interactive environments (#12979). - Language updates:
- Package setup updates:
- Update NumPy build constraints for NumPy 1.25+ (#12839). For Python 3.9+, it is no longer necessary to set build constraints while building binary wheels.
- Refactor Cython profiling in order to disable profiling for Python 3.12 in the package setup, since Cython does not currently support profiling for Python 3.12 (#12979).
π¦ Trained pipelines updates
The transformer-based trf
pipelines have been updated to use our new Curated Transformers library through the Thinc model wrappers and pipeline component from spaCy Curated Transformers.
β οΈ Backwards incompatibilities
- Drop support for Python 3.6.
- Drop mypy checks for Python 3.7.
- Remove
ray
extra. spacy project
has a few backwards incompatibilities due to the transition to the standalone library Weasel, which is not as tightly coupled to spaCy. Weasel produces warnings when it detects older spaCy-specific settings in your environment or project config.- Support for the
spacy_version
configuration key has been dropped. - Support for the
check_requirements
configuration key has been dropped due to the deprecation ofpkg_resources
. - The
SPACY_CONFIG_OVERRIDES
environment variable is no longer checked. You can set configuration overrides usingWEASEL_CONFIG_OVERRIDES
. - Support for
SPACY_PROJECT_USE_GIT_VERSION
environment variable has been dropped. - Error codes are now Weasel-specific and do not follow spaCy error codes.
- Support for the
π Documentation and examples
- New and updated documentation for large language models and spaCy Curated Transformers.
- Various documentation corrections and updates.
- New additions to the spaCy Universe:
- Hobbit spaCy: NLP for Middle Earth
- rolegal: a spaCy Package for Noisy Romanian Legal Document Processing
π₯ Contributors
@adrianeboyd, @bdura, @connorbrinton, @danieldk, @davidberenstein1957, @denizcodeyaa, @eltociear, @evornov, @honnibal, @ines, @jmyerston, @koaning, @magdaaniol, @pdhall99, @ringohoffman, @rmitsch, @senisioi, @shadeMe, @svlandeg, @vinbo8, @wjbmattingly