website/docs/usage/v3-7.mdx
spaCy v3.7 adds support for Python 3.12, introduces the new standalone library Weasel for project workflows, and updates the transformer-based trained pipelines to use our new Curated Transformers library.
This release drops support for Python 3.6.
The spaCy projects functionality has been moved into a new standalone library Weasel. This brings minor changes to spaCy-specific settings in spaCy projects (see upgrading below), but also makes it possible to use the same workflow functionality outside of spaCy.
All spacy project commands should run as before, just now they're using Weasel
under the hood.
Remote storage for spaCy projects is not yet supported for Python 3.12. Use Python 3.11 or earlier for remote storage.
</Infobox>You can specify a custom registered vectors class under [nlp.vectors] in order
to use static vectors in formats other than the ones supported by
Vectors. To implement your custom vectors, extend the abstract
class BaseVectors. See an example using
BPEmb subword embeddings.
transformers extra to spacy-transformers v1.3.--spans-key option for CLI evaluation with spacy benchmark accuracy.spacy.info.spacy.training.example.Language.replace_listeners: Pass the replaced listener and the tok2vec
pipe to the callback in order to support spacy-curated-transformers.tqdm with disable=None in order to disable output in
non-interactive environments.The transformer-based trf pipelines have been updated to use our new
Curated Transformers
library using the Thinc model wrappers and pipeline component from
spaCy Curated Transformers.
This release drops support for Python 3.6, drops mypy checks for Python 3.7 and
removes the ray extra. In addition there are several minor changes for spaCy
projects described in the following section.
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.
spacy_version configuration key has been dropped.check_requirements configuration key has been dropped due to
the deprecation of pkg_resources.SPACY_CONFIG_OVERRIDES environment variable is no longer checked. You
can set configuration overrides using WEASEL_CONFIG_OVERRIDES.SPACY_PROJECT_USE_GIT_VERSION environment variable has been
dropped.Using legacy implementations
In spaCy v3, you'll still be able to load and reference legacy implementations via
spacy-legacy, even if the components or architectures change and newer versions are available in the core library.
When you're loading a pipeline package trained with an earlier version of spaCy v3, you will see a warning telling you that the pipeline may be incompatible. This doesn't necessarily have to be true, but we recommend running your pipelines against your test suite or evaluation data to make sure there are no unexpected results.
If you're using one of the trained pipelines we provide, you should
run spacy download to update to the latest version. To
see an overview of all installed packages and their compatibility, you can run
spacy validate.
If you've trained your own custom pipeline and you've confirmed that it's still
working as expected, you can update the spaCy version requirements in the
meta.json:
- "spacy_version": ">=3.6.0,<3.7.0",
+ "spacy_version": ">=3.6.0,<3.8.0",
To update a config from spaCy v3.6 with the new v3.7 settings, run
init fill-config:
$ python -m spacy init fill-config config-v3.6.cfg config-v3.7.cfg
In many cases (spacy train,
spacy.load), the new defaults will be filled in
automatically, but you'll need to fill in the new settings to run
debug config and debug data.