🌙 This release is a nightly pre-release and not intended for production yet. We recommend using a new virtual environment. For more details on the new features and usage guides, see the v3 documentation.
⚠️⚠️⚠️ Make sure to retrain your models! ⚠️⚠️⚠️
This release includes changes to the config and model architectures, so if you've trained a custom pipeline with
v3.0.0rc2, you'll need to retrain it. We recommend using the new spaCy projects system to make it easy to re-run your training process. To auto-fill and update your configs, you can use the
📣 NEW: Want to make the transition from spaCy v2 to spaCy v3 as smooth as possible for you and your organization? We're now offering commercial migration support for your spaCy pipelines! We've put a lot of work into making it easy to upgrade your existing code and training workflows – but custom projects may always need some custom work, especially when it comes to taking advantage of the new capabilities. Details & application →
pip install -U spacy-nightly --pre
- Introducing spaCy v3.0 nightly
- New in v3.0: New features, backwards incompatibilities and migration guide.
- Installation Quickstart: Install the new version, pipelines and add-ons for your specific setup.
- Training Quickstart: Generate a training config for your specific use case.
- Benchmarks: Results and accuracy comparisons.
- Projects & Project Templates: Get started by cloning a project template.
✨ New features and improvements
- Transformer-based pipelines with support for multi-task learning.
- Retrained model families for 18 languages and 58 trained pipelines in total, including 5 transformer-based pipelines.
- New core pipelines for Macedonian and Russian. Thanks to @borijang, @buriy and @kuk for their contributions!
- New training workflow and config system.
- Implement custom models using any machine learning framework, including PyTorch, TensorFlow and MXNet.
- spaCy Projects for managing end-to-end multi-step workflows from preprocessing to model deployment.
- Integrations with Data Version Control (DVC), Streamlit, Weights & Biases, Ray and more.
- Parallel training and distributed computing with Ray.
- New built-in pipeline components:
- New and improved pipeline component API and decorators for custom components.
- Source trained components from other pipelines in your training config.
DependencyMatcherfor matching patterns within the dependency parse using Semgrex operators.
- Support for greedy patterns in
- Type hints and type-based data validation for custom registered functions.
- Various new methods, attributes and commands.
⚠️ Backwards incompatibilities
For more info on how to migrate from spaCy v2.x, see the detailed migration guide.
- Pipeline package symlinks, the
linkcommand and shortcut names are now deprecated. There can be many different trained pipelines and not just one "English model", so you should always use the full package name like
- A pipeline's
meta.jsonis now only used to provide meta information like the package name, author, license and labels. It's not used to construct the processing pipeline anymore. This is all defined in the
config.cfg, which also includes all settings used to train the pipeline.
debug datacommands now only take a
Language.add_pipenow takes the string name of the component factory instead of the component function.
- Custom pipeline components now need to be decorated with the
TrainablePipe.updatemethods now all take batches of
Exampleobjects instead of
GoldParseobjects, or raw text and a dictionary of annotations.
begin_trainingmethods have been renamed to
initializeand now take a function that returns a sequence of
Exampleobjects to initialize the model instead of a list of tuples.
PhraseMatcher.addnow only accept a list of patterns as the second argument (instead of a variable number of arguments). The
on_matchcallback becomes an optional keyword argument.
Doc.is_taggedhave been replaced by
spacy.goldmodule has been renamed to
-PRON-as an indicator for pronoun lemmas has been removed.
MORPH_RULESin the language data have been replaced by the more flexible
Lemmatizeris now a standalone pipeline component and doesn't provide lemmas by default or switch automatically between lookup and rule-based lemmas. You can now add it to your pipeline explicitly and set its mode on initialization.
- Various keyword arguments across functions and methods are now explicitly declared as keyword-only arguments. Those arguments are documented accordingly across the API reference.
Removed or renamed API
|not needed, symlinks are deprecated|
The following deprecated methods, attributes and arguments were removed in v3.0. Most of them have been deprecated for a while and many would previously raise errors. Many of them were also mostly internals. If you've been working with more recent versions of spaCy v2.x, it's unlikely that your code relied on them.
|keyword-arguments like |
|user hooks, |