From 343f4f21d706971be93757b430bad39e9ed49ed3 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 11 Dec 2024 14:13:28 +0100 Subject: [PATCH 01/15] Enable Python 3.13 --- build-constraints.txt | 6 +----- pyproject.toml | 3 +-- setup.cfg | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/build-constraints.txt b/build-constraints.txt index b1cf596ca7c..94ebdc0705c 100644 --- a/build-constraints.txt +++ b/build-constraints.txt @@ -1,6 +1,2 @@ # 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.25.0; python_version>='3.9' +numpy>=2.0.0,<3.0.0 diff --git a/pyproject.toml b/pyproject.toml index 2edbadefc81..7d72f6b74f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,8 +6,7 @@ requires = [ "preshed>=3.0.2,<3.1.0", "murmurhash>=0.28.0,<1.1.0", "thinc>=8.3.0,<8.4.0", - "numpy>=2.0.0,<2.1.0; python_version < '3.9'", - "numpy>=2.0.0,<2.1.0; python_version >= '3.9'", + "numpy>=2.0.0,<3.0.0" ] build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg index dc2493ed765..2afea1a3b17 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,7 +30,7 @@ project_urls = [options] zip_safe = false include_package_data = true -python_requires = >=3.9,<3.13 +python_requires = >=3.9,<3.14 # NOTE: This section is superseded by pyproject.toml and will be removed in # spaCy v4 setup_requires = From 682140496adb2b8448dab34a1a551f0293ed1d5a Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 11 Dec 2024 14:13:51 +0100 Subject: [PATCH 02/15] Align requirements better --- requirements.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index c1e4a4508f0..c3553508d5d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,8 +12,7 @@ catalogue>=2.0.6,<2.1.0 typer>=0.3.0,<1.0.0 weasel>=0.1.0,<0.5.0 # Third party dependencies -numpy>=2.0.0; python_version < "3.9" -numpy>=2.0.0; python_version >= "3.9" +numpy>=2.0.0,<3.0.0 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 From 311f7cc9fbd44e3de14fa673fa9c5146ea223624 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 11 Dec 2024 14:14:08 +0100 Subject: [PATCH 03/15] Set version to v3.8.4 --- spacy/about.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/about.py b/spacy/about.py index a42f63a5d6d..f85bf6d5fe1 100644 --- a/spacy/about.py +++ b/spacy/about.py @@ -1,5 +1,5 @@ # fmt: off __title__ = "spacy" -__version__ = "3.8.3" +__version__ = "3.8.4" __download_url__ = "https://github.com/explosion/spacy-models/releases/download" __compatibility__ = "https://raw.githubusercontent.com/explosion/spacy-models/master/compatibility.json" From 31eefb36c84d3ae9678f883a6a3b85f7f9c2df4f Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Thu, 12 Dec 2024 23:25:40 +0100 Subject: [PATCH 04/15] Re-enable pretraining test --- .../{test_pretraining.py.disabled => test_pretraining.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename spacy/tests/training/{test_pretraining.py.disabled => test_pretraining.py} (100%) diff --git a/spacy/tests/training/test_pretraining.py.disabled b/spacy/tests/training/test_pretraining.py similarity index 100% rename from spacy/tests/training/test_pretraining.py.disabled rename to spacy/tests/training/test_pretraining.py From 45bbcd18f2a608b2bb3421e9aa0ed51002ab6e33 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Thu, 12 Dec 2024 23:27:52 +0100 Subject: [PATCH 05/15] Format --- spacy/tests/training/test_pretraining.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/tests/training/test_pretraining.py b/spacy/tests/training/test_pretraining.py index 22364bb78de..41cbddcae9b 100644 --- a/spacy/tests/training/test_pretraining.py +++ b/spacy/tests/training/test_pretraining.py @@ -265,7 +265,7 @@ def test_pretraining_tagger(): # Try to debug segfault on windows -#def test_pretraining_training(): +# def test_pretraining_training(): # """Test that training can use a pretrained Tok2Vec model""" # config = Config().from_str(pretrain_string_internal) # nlp = util.load_model_from_config(config, auto_fill=True, validate=False) From 054dc113b251849cf6f3aa1dd25784aa4e1b1f11 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Fri, 13 Dec 2024 00:04:23 +0100 Subject: [PATCH 06/15] Upd tests --- .github/workflows/tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3da2b63d8f4..bfaaa235637 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -164,9 +164,10 @@ jobs: - name: "Run CPU tests" run: | + # Hack this in to test whether blis matters for this windows bug + pip install blis==1.1.0a0 python -m pytest --pyargs spacy -W error if: "!(startsWith(matrix.os, 'macos') && matrix.python_version == '3.11')" - - name: "Run CPU tests with thinc-apple-ops" run: | python -m pip install 'spacy[apple]' From c999a440853674de3ae5900163b7c772fcbe578d Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Fri, 13 Dec 2024 00:25:54 +0100 Subject: [PATCH 07/15] Try to set omp num threads to 1 --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bfaaa235637..05b18d80880 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -166,6 +166,7 @@ jobs: run: | # Hack this in to test whether blis matters for this windows bug pip install blis==1.1.0a0 + export OPENBLAS_NUM_THREADS=1 python -m pytest --pyargs spacy -W error if: "!(startsWith(matrix.os, 'macos') && matrix.python_version == '3.11')" - name: "Run CPU tests with thinc-apple-ops" From e108935de834796ee8e15bf9c09e2b477485d5eb Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Fri, 13 Dec 2024 00:38:34 +0100 Subject: [PATCH 08/15] Fix blis install --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 05b18d80880..1e8c2f722ab 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -165,7 +165,7 @@ jobs: - name: "Run CPU tests" run: | # Hack this in to test whether blis matters for this windows bug - pip install blis==1.1.0a0 + pip install blis==1.1.0a0 --no-deps --ignore-installed export OPENBLAS_NUM_THREADS=1 python -m pytest --pyargs spacy -W error if: "!(startsWith(matrix.os, 'macos') && matrix.python_version == '3.11')" From 49b9979047ce271d742637ec6905fd55e3cef0bf Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Fri, 13 Dec 2024 00:58:28 +0100 Subject: [PATCH 09/15] Upd tests --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1e8c2f722ab..d00f4183956 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -166,7 +166,7 @@ jobs: run: | # Hack this in to test whether blis matters for this windows bug pip install blis==1.1.0a0 --no-deps --ignore-installed - export OPENBLAS_NUM_THREADS=1 + set OPENBLAS_NUM_THREADS=1 python -m pytest --pyargs spacy -W error if: "!(startsWith(matrix.os, 'macos') && matrix.python_version == '3.11')" - name: "Run CPU tests with thinc-apple-ops" From 54d3a0e225ba46e5a7704bc2d1055d59f143de55 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Fri, 13 Dec 2024 01:39:36 +0100 Subject: [PATCH 10/15] Test for new blis --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d00f4183956..b8b56b5dc7f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -165,6 +165,7 @@ jobs: - name: "Run CPU tests" run: | # Hack this in to test whether blis matters for this windows bug + pip uninstall blis -y pip install blis==1.1.0a0 --no-deps --ignore-installed set OPENBLAS_NUM_THREADS=1 python -m pytest --pyargs spacy -W error From f319a2ab843e14017e11727ebd65ac86cec7dd22 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 16 Dec 2024 13:38:37 +0100 Subject: [PATCH 11/15] Update pins --- pyproject.toml | 4 ++-- setup.cfg | 42 +++++++++++++++++++++--------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7d72f6b74f7..a738ce7cb6d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,8 +5,8 @@ requires = [ "cymem>=2.0.2,<2.1.0", "preshed>=3.0.2,<3.1.0", "murmurhash>=0.28.0,<1.1.0", - "thinc>=8.3.0,<8.4.0", - "numpy>=2.0.0,<3.0.0" + "thinc>=8.3.3,<8.4.0", + "numpy>=1.15.0,<3.0.0" ] build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg index 2afea1a3b17..e6f8c2b5038 100644 --- a/setup.cfg +++ b/setup.cfg @@ -57,8 +57,8 @@ install_requires = # Third-party dependencies typer>=0.3.0,<1.0.0 tqdm>=4.38.0,<5.0.0 - numpy>=1.15.0; python_version < "3.9" - numpy>=1.19.0; python_version >= "3.9" + numpy>=1.15.0,<3.0; python_version < "3.9" + numpy>=1.19.0,<3.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 @@ -77,43 +77,43 @@ lookups = transformers = spacy_transformers>=1.1.2,<1.4.0 cuda = - cupy>=5.0.0b4,<13.0.0 + cupy>=5.0.0b4,<14.0.0 cuda80 = - cupy-cuda80>=5.0.0b4,<13.0.0 + cupy-cuda80>=5.0.0b4,<14.0.0 cuda90 = - cupy-cuda90>=5.0.0b4,<13.0.0 + cupy-cuda90>=5.0.0b4,<14.0.0 cuda91 = - cupy-cuda91>=5.0.0b4,<13.0.0 + cupy-cuda91>=5.0.0b4,<14.0.0 cuda92 = - cupy-cuda92>=5.0.0b4,<13.0.0 + cupy-cuda92>=5.0.0b4,<14.0.0 cuda100 = - cupy-cuda100>=5.0.0b4,<13.0.0 + cupy-cuda100>=5.0.0b4,<14.0.0 cuda101 = - cupy-cuda101>=5.0.0b4,<13.0.0 + cupy-cuda101>=5.0.0b4,<14.0.0 cuda102 = - cupy-cuda102>=5.0.0b4,<13.0.0 + cupy-cuda102>=5.0.0b4,<14.0.0 cuda110 = - cupy-cuda110>=5.0.0b4,<13.0.0 + cupy-cuda110>=5.0.0b4,<14.0.0 cuda111 = - cupy-cuda111>=5.0.0b4,<13.0.0 + cupy-cuda111>=5.0.0b4,<14.0.0 cuda112 = - cupy-cuda112>=5.0.0b4,<13.0.0 + cupy-cuda112>=5.0.0b4,<14.0.0 cuda113 = - cupy-cuda113>=5.0.0b4,<13.0.0 + cupy-cuda113>=5.0.0b4,<14.0.0 cuda114 = - cupy-cuda114>=5.0.0b4,<13.0.0 + cupy-cuda114>=5.0.0b4,<14.0.0 cuda115 = - cupy-cuda115>=5.0.0b4,<13.0.0 + cupy-cuda115>=5.0.0b4,<14.0.0 cuda116 = - cupy-cuda116>=5.0.0b4,<13.0.0 + cupy-cuda116>=5.0.0b4,<14.0.0 cuda117 = - cupy-cuda117>=5.0.0b4,<13.0.0 + cupy-cuda117>=5.0.0b4,<14.0.0 cuda11x = - cupy-cuda11x>=11.0.0,<13.0.0 + cupy-cuda11x>=11.0.0,<14.0.0 cuda12x = - cupy-cuda12x>=11.5.0,<13.0.0 + cupy-cuda12x>=11.5.0,<14.0.0 cuda-autodetect = - cupy-wheel>=11.0.0,<13.0.0 + cupy-wheel>=11.0.0,<14.0.0 apple = thinc-apple-ops>=1.0.0,<2.0.0 # Language tokenizers with external dependencies From 4b0c84540101bca293b4021187a1e876a48c5a42 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 16 Dec 2024 13:39:07 +0100 Subject: [PATCH 12/15] Unhack blis install --- .github/workflows/tests.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b8b56b5dc7f..ac828c991f8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -164,10 +164,6 @@ jobs: - name: "Run CPU tests" run: | - # Hack this in to test whether blis matters for this windows bug - pip uninstall blis -y - pip install blis==1.1.0a0 --no-deps --ignore-installed - set OPENBLAS_NUM_THREADS=1 python -m pytest --pyargs spacy -W error if: "!(startsWith(matrix.os, 'macos') && matrix.python_version == '3.11')" - name: "Run CPU tests with thinc-apple-ops" From d122f6a15dd9ca86b49143fc4b77ae7198883db7 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 16 Dec 2024 14:15:20 +0100 Subject: [PATCH 13/15] Fix requirements --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c3553508d5d..fc03e701848 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ 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.3.0,<8.4.0 +thinc>=8.3.3,<8.4.0 ml_datasets>=0.2.0,<0.3.0 murmurhash>=0.28.0,<1.1.0 wasabi>=0.9.1,<1.2.0 From 604cd5d8445be84d2204f78f09a5229830b26eef Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 16 Dec 2024 14:37:47 +0100 Subject: [PATCH 14/15] Update setup.cfg --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index e6f8c2b5038..4e6a109f8c0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -41,7 +41,7 @@ setup_requires = cymem>=2.0.2,<2.1.0 preshed>=3.0.2,<3.1.0 murmurhash>=0.28.0,<1.1.0 - thinc>=8.3.0,<8.4.0 + thinc>=8.3.3,<8.4.0 install_requires = # Our libraries spacy-legacy>=3.0.11,<3.1.0 From 74439d3e1cb19c33a59595992bd68b4ee5c3f8de Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 16 Dec 2024 15:17:44 +0100 Subject: [PATCH 15/15] Normalize thinc version --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 4e6a109f8c0..c2a7bc0490c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -49,7 +49,7 @@ install_requires = murmurhash>=0.28.0,<1.1.0 cymem>=2.0.2,<2.1.0 preshed>=3.0.2,<3.1.0 - thinc>=8.3.0,<8.4.0 + thinc>=8.3.3,<8.4.0 wasabi>=0.9.1,<1.2.0 srsly>=2.4.3,<3.0.0 catalogue>=2.0.6,<2.1.0