Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync docs/llm_main with master #13045

Merged
merged 50 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
6f3a719
Merge pull request #12784 from explosion/master
svlandeg Jul 4, 2023
8113cfb
`Language.replace_listeners`: Pass the replaced listener and the `tok…
shadeMe Jul 5, 2023
d195923
Set version to `3.7.0.dev0` (#12799)
shadeMe Jul 6, 2023
991bcc1
disable tests until 3.7 models are available
svlandeg Jul 7, 2023
9e63006
Merge pull request #12800 from explosion/master_copy
svlandeg Jul 7, 2023
b1b20bf
Replace projects functionality with weasel (#12769)
svlandeg Jul 7, 2023
79ec68f
Merge branch 'upstream_master' into sync_develop
svlandeg Jul 19, 2023
ea54d17
Merge pull request #12840 from svlandeg/sync_develop
svlandeg Jul 19, 2023
4f8daa4
Add Left and Right Pointing Angle Brackets as punctuation to ancient …
jmyerston Jul 20, 2023
5888afa
Update numpy build constraints for numpy 1.25 (#12839)
adrianeboyd Jul 24, 2023
9ffa5d8
Remove ray extra (#12870)
adrianeboyd Jul 28, 2023
0fe43f4
Support registered vectors (#12492)
adrianeboyd Aug 1, 2023
0737443
feat: add example stubs (3) (#12801)
svlandeg Aug 2, 2023
e5773e0
Extend to spacy-transformers v1.3.x (#12877)
adrianeboyd Aug 2, 2023
060241a
Revert "Extend to spacy-transformers v1.3.x (#12877)"
adrianeboyd Aug 10, 2023
6ef29c4
Merge pull request #12901 from adrianeboyd/feature/spacy-transformers…
adrianeboyd Aug 10, 2023
9622c11
Extend to weasel v0.2 (#12902)
adrianeboyd Aug 11, 2023
6a4aa43
Extend to thinc v8.2 (#12897)
adrianeboyd Aug 11, 2023
198488e
Extend to weasel v0.3 (#12908)
adrianeboyd Aug 16, 2023
869cc4a
warn when an unsupported/unknown key is given to the dependency match…
svlandeg Aug 22, 2023
c230385
Documentation for spacy-curated-transformers (#12677)
vinbo8 Aug 29, 2023
36d4767
Skip project remotes test for python 3.12 (#12980)
adrianeboyd Sep 13, 2023
4e3360a
add --spans-key option for CLI spancat evaluation (#12981)
evornov Sep 25, 2023
ed8c11e
Fix typo in lemmatizer.py (#13003)
eltociear Sep 25, 2023
935a545
Docs: add new tag for evaluate CLI --spans-keys (#13013)
adrianeboyd Sep 25, 2023
ff4215f
Drop support for python 3.6 (#13009)
adrianeboyd Sep 25, 2023
b4501db
Update emoji library in rule-based matcher example (#13014)
shadeMe Sep 25, 2023
6255e38
Adding rolegal model to the spaCy universe (#13017)
senisioi Sep 28, 2023
beda27a
Load the cli module lazily for spacy.info (#12962)
danieldk Sep 28, 2023
406794a
Merge remote-tracking branch 'upstream/master' into chore/update-deve…
adrianeboyd Sep 28, 2023
36201cb
Merge pull request #13027 from adrianeboyd/chore/update-develop-from-…
adrianeboyd Sep 28, 2023
55614d6
Add profile=False to currently unprofiled cython
adrianeboyd Sep 12, 2023
5383049
Remove profile=True from currently profiled cython
adrianeboyd Sep 12, 2023
1adf794
Set cython profiling default to True for <3.12, False for >=3.12
adrianeboyd Sep 12, 2023
76d94b3
Branch on python 3.12+ shutil.rmtree in make_tempdir
adrianeboyd Sep 22, 2023
b499039
Update mypy requirements
adrianeboyd Sep 22, 2023
467c824
Always use tqdm with `disable=None`
adrianeboyd Sep 22, 2023
78504c2
CI: Add python 3.12.0rc2
adrianeboyd Sep 22, 2023
6b4f774
Set version to v3.7.0 (#13028)
adrianeboyd Sep 28, 2023
483d4a5
Allow spacy-transformers v1.3.x in transformers extra (#13025)
ringohoffman Sep 29, 2023
4ec41e9
Merge pull request #12979 from adrianeboyd/feature/cython-profile-312
adrianeboyd Sep 29, 2023
1b043dd
Revert "disable tests until 3.7 models are available"
adrianeboyd Aug 9, 2023
0fed2d9
Merge pull request #12899 from adrianeboyd/chore/v3.7.0
adrianeboyd Oct 1, 2023
160e617
Docs for v3.7.0 (#13029)
adrianeboyd Oct 1, 2023
92ce32a
Update binder version to v3.7 (#13034)
adrianeboyd Oct 2, 2023
6d0185f
Revert "Load the cli module lazily for spacy.info (#12962)"
adrianeboyd Oct 4, 2023
aec59c0
Merge pull request #13040 from adrianeboyd/revert/12962-spacy-info
adrianeboyd Oct 4, 2023
9d03660
Set version to v3.7.1 (#13042)
adrianeboyd Oct 4, 2023
6e54360
Remove pathy dependency, update docs for cloudpathlib in Weasel (#13035)
adrianeboyd Oct 5, 2023
be29216
Merge pull request #13044 from explosion/docs/llm_main
rmitsch Oct 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python_version: ["3.11"]
python_version: ["3.11", "3.12.0-rc.2"]
include:
- os: ubuntu-20.04
python_version: "3.6"
- os: windows-latest
python_version: "3.7"
- os: macos-latest
Expand Down Expand Up @@ -95,7 +93,7 @@ jobs:
- name: Run mypy
run: |
python -m mypy spacy
if: matrix.python_version != '3.6'
if: matrix.python_version != '3.7'

- name: Delete source directory and .egg-info
run: |
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ model packaging, deployment and workflow management. spaCy is commercial
open-source software, released under the
[MIT license](https://github.com/explosion/spaCy/blob/master/LICENSE).

💫 **Version 3.6 out now!**
💫 **Version 3.7 out now!**
[Check out the release notes here.](https://github.com/explosion/spaCy/releases)

[![tests](https://github.com/explosion/spaCy/actions/workflows/tests.yml/badge.svg)](https://github.com/explosion/spaCy/actions/workflows/tests.yml)
Expand Down Expand Up @@ -108,7 +108,7 @@ For detailed installation instructions, see the

- **Operating system**: macOS / OS X · Linux · Windows (Cygwin, MinGW, Visual
Studio)
- **Python version**: Python 3.6+ (only 64 bit)
- **Python version**: Python 3.7+ (only 64 bit)
- **Package managers**: [pip] · [conda] (via `conda-forge`)

[pip]: https://pypi.org/project/spacy/
Expand Down
11 changes: 4 additions & 7 deletions build-constraints.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# build version constraints for use with wheelwright + multibuild
numpy==1.15.0; python_version<='3.7' and platform_machine!='aarch64'
numpy==1.19.2; python_version<='3.7' and platform_machine=='aarch64'
# build version constraints for use with wheelwright
numpy==1.15.0; python_version=='3.7' and platform_machine!='aarch64'
numpy==1.19.2; python_version=='3.7' and platform_machine=='aarch64'
numpy==1.17.3; python_version=='3.8' and platform_machine!='aarch64'
numpy==1.19.2; python_version=='3.8' and platform_machine=='aarch64'
numpy==1.19.3; python_version=='3.9'
numpy==1.21.3; python_version=='3.10'
numpy==1.23.2; python_version=='3.11'
numpy; python_version>='3.12'
numpy>=1.25.0; python_version>='3.9'
39 changes: 27 additions & 12 deletions extra/DEVELOPER_DOCS/Listeners.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# Listeners

1. [Overview](#1-overview)
2. [Initialization](#2-initialization)
- [A. Linking listeners to the embedding component](#2a-linking-listeners-to-the-embedding-component)
- [B. Shape inference](#2b-shape-inference)
3. [Internal communication](#3-internal-communication)
- [A. During prediction](#3a-during-prediction)
- [B. During training](#3b-during-training)
- [C. Frozen components](#3c-frozen-components)
4. [Replacing listener with standalone](#4-replacing-listener-with-standalone)
- [1. Overview](#1-overview)
- [2. Initialization](#2-initialization)
- [2A. Linking listeners to the embedding component](#2a-linking-listeners-to-the-embedding-component)
- [2B. Shape inference](#2b-shape-inference)
- [3. Internal communication](#3-internal-communication)
- [3A. During prediction](#3a-during-prediction)
- [3B. During training](#3b-during-training)
- [Training with multiple listeners](#training-with-multiple-listeners)
- [3C. Frozen components](#3c-frozen-components)
- [The Tok2Vec or Transformer is frozen](#the-tok2vec-or-transformer-is-frozen)
- [The upstream component is frozen](#the-upstream-component-is-frozen)
- [4. Replacing listener with standalone](#4-replacing-listener-with-standalone)

## 1. Overview

Expand Down Expand Up @@ -62,7 +65,7 @@ of this `find_listener()` method will specifically identify sublayers of a model

If it's a Transformer-based pipeline, a
[`transformer` component](https://github.com/explosion/spacy-transformers/blob/master/spacy_transformers/pipeline_component.py)
has a similar implementation but its `find_listener()` function will specifically look for `TransformerListener`
has a similar implementation but its `find_listener()` function will specifically look for `TransformerListener`
sublayers of downstream components.

### 2B. Shape inference
Expand Down Expand Up @@ -154,7 +157,7 @@ as a tagger or a parser. This used to be impossible before 3.1, but has become s
embedding component in the [`annotating_components`](https://spacy.io/usage/training#annotating-components)
list of the config. This works like any other "annotating component" because it relies on the `Doc` attributes.

However, if the `Tok2Vec` or `Transformer` is frozen, and not present in `annotating_components`, and a related
However, if the `Tok2Vec` or `Transformer` is frozen, and not present in `annotating_components`, and a related
listener isn't frozen, then a `W086` warning is shown and further training of the pipeline will likely end with `E954`.

#### The upstream component is frozen
Expand Down Expand Up @@ -216,5 +219,17 @@ new_model = tok2vec_model.attrs["replace_listener"](new_model)
```

The new config and model are then properly stored on the `nlp` object.
Note that this functionality (running the replacement for a transformer listener) was broken prior to
Note that this functionality (running the replacement for a transformer listener) was broken prior to
`spacy-transformers` 1.0.5.

In spaCy 3.7, `Language.replace_listeners` was updated to pass the following additional arguments to the `replace_listener` callback:
the listener to be replaced and the `tok2vec`/`transformer` pipe from which the new model was copied. To maintain backwards-compatiblity,
the method only passes these extra arguments for callbacks that support them:

```
def replace_listener_pre_37(copied_tok2vec_model):
...

def replace_listener_post_37(copied_tok2vec_model, replaced_listener, tok2vec_pipe):
...
```
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ requires = [
"cymem>=2.0.2,<2.1.0",
"preshed>=3.0.2,<3.1.0",
"murmurhash>=0.28.0,<1.1.0",
"thinc>=8.1.8,<8.2.0",
"numpy>=1.15.0",
"thinc>=8.1.8,<8.3.0",
"numpy>=1.15.0; python_version < '3.9'",
"numpy>=1.25.0; python_version >= '3.9'",
]
build-backend = "setuptools.build_meta"

Expand Down
12 changes: 6 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ spacy-legacy>=3.0.11,<3.1.0
spacy-loggers>=1.0.0,<2.0.0
cymem>=2.0.2,<2.1.0
preshed>=3.0.2,<3.1.0
thinc>=8.1.8,<8.2.0
thinc>=8.1.8,<8.3.0
ml_datasets>=0.2.0,<0.3.0
murmurhash>=0.28.0,<1.1.0
wasabi>=0.9.1,<1.2.0
srsly>=2.4.3,<3.0.0
catalogue>=2.0.6,<2.1.0
typer>=0.3.0,<0.10.0
pathy>=0.10.0
smart-open>=5.2.1,<7.0.0
weasel>=0.1.0,<0.4.0
# Third party dependencies
numpy>=1.15.0
numpy>=1.15.0; python_version < "3.9"
numpy>=1.19.0; python_version >= "3.9"
requests>=2.13.0,<3.0.0
tqdm>=4.38.0,<5.0.0
pydantic>=1.7.4,!=1.8,!=1.8.1,<3.0.0
Expand All @@ -31,12 +32,11 @@ pytest-timeout>=1.3.0,<2.0.0
mock>=2.0.0,<3.0.0
flake8>=3.8.0,<6.0.0
hypothesis>=3.27.0,<7.0.0
mypy>=0.990,<1.1.0; platform_machine != "aarch64" and python_version >= "3.7"
types-dataclasses>=0.1.3; python_version < "3.7"
mypy>=1.5.0,<1.6.0; platform_machine != "aarch64" and python_version >= "3.8"
types-mock>=0.1.1
types-setuptools>=57.0.0
types-requests
types-setuptools>=57.0.0
black==22.3.0
cython-lint>=0.15.0; python_version >= "3.7"
cython-lint>=0.15.0
isort>=5.0,<6.0
21 changes: 11 additions & 10 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ classifiers =
Operating System :: Microsoft :: Windows
Programming Language :: Cython
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Expand All @@ -31,32 +30,36 @@ project_urls =
[options]
zip_safe = false
include_package_data = true
python_requires = >=3.6
python_requires = >=3.7
# NOTE: This section is superseded by pyproject.toml and will be removed in
# spaCy v4
setup_requires =
cython>=0.25,<3.0
numpy>=1.15.0
numpy>=1.15.0; python_version < "3.9"
numpy>=1.19.0; python_version >= "3.9"
# We also need our Cython packages here to compile against
cymem>=2.0.2,<2.1.0
preshed>=3.0.2,<3.1.0
murmurhash>=0.28.0,<1.1.0
thinc>=8.1.8,<8.2.0
thinc>=8.1.8,<8.3.0
install_requires =
# Our libraries
spacy-legacy>=3.0.11,<3.1.0
spacy-loggers>=1.0.0,<2.0.0
murmurhash>=0.28.0,<1.1.0
cymem>=2.0.2,<2.1.0
preshed>=3.0.2,<3.1.0
thinc>=8.1.8,<8.2.0
thinc>=8.1.8,<8.3.0
wasabi>=0.9.1,<1.2.0
srsly>=2.4.3,<3.0.0
catalogue>=2.0.6,<2.1.0
weasel>=0.1.0,<0.4.0
# Third-party dependencies
typer>=0.3.0,<0.10.0
pathy>=0.10.0
smart-open>=5.2.1,<7.0.0
tqdm>=4.38.0,<5.0.0
numpy>=1.15.0
numpy>=1.15.0; python_version < "3.9"
numpy>=1.19.0; python_version >= "3.9"
requests>=2.13.0,<3.0.0
pydantic>=1.7.4,!=1.8,!=1.8.1,<3.0.0
jinja2
Expand All @@ -74,9 +77,7 @@ console_scripts =
lookups =
spacy_lookups_data>=1.0.3,<1.1.0
transformers =
spacy_transformers>=1.1.2,<1.3.0
ray =
spacy_ray>=0.1.0,<1.0.0
spacy_transformers>=1.1.2,<1.4.0
cuda =
cupy>=5.0.0b4,<13.0.0
cuda80 =
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"language_level": -3,
"embedsignature": True,
"annotation_typing": False,
"profile": sys.version_info < (3, 12),
}
# Files to copy into the package that are otherwise not included
COPY_FILES = {
Expand Down
4 changes: 1 addition & 3 deletions spacy/about.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# fmt: off
__title__ = "spacy"
__version__ = "3.6.1"
__version__ = "3.7.1"
__download_url__ = "https://github.com/explosion/spacy-models/releases/download"
__compatibility__ = "https://raw.githubusercontent.com/explosion/spacy-models/master/compatibility.json"
__projects__ = "https://github.com/explosion/projects"
__projects_branch__ = "v3"
1 change: 1 addition & 0 deletions spacy/attrs.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# cython: profile=False
from .errors import Errors

IOB_STRINGS = ("", "I", "O", "B")
Expand Down
7 changes: 0 additions & 7 deletions spacy/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@
from .package import package # noqa: F401
from .pretrain import pretrain # noqa: F401
from .profile import profile # noqa: F401
from .project.assets import project_assets # noqa: F401
from .project.clone import project_clone # noqa: F401
from .project.document import project_document # noqa: F401
from .project.dvc import project_update_dvc # noqa: F401
from .project.pull import project_pull # noqa: F401
from .project.push import project_push # noqa: F401
from .project.run import project_run # noqa: F401
from .train import train_cli # noqa: F401
from .validate import validate # noqa: F401

Expand Down
Loading