From 5246c38fbcd83eca7073fcc7a4b03cb69ac49c95 Mon Sep 17 00:00:00 2001 From: Gabriele Sarti Date: Wed, 26 Oct 2022 13:44:00 +0200 Subject: [PATCH 1/2] Added Python 3.11 checks --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ed6a238..e73a6f76 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' strategy: matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v3 From 7791d0e7f1b3346736c0e73ebf095e615d04a251 Mon Sep 17 00:00:00 2001 From: Gabriele Sarti Date: Sun, 30 Oct 2022 14:10:45 +0100 Subject: [PATCH 2/2] Python 3.11 CI support (#146) --- .github/workflows/build.yml | 6 +- Makefile | 9 +- poetry.lock | 181 +++++++++++++++++++----------------- pyproject.toml | 50 +++++----- requirements.txt | 31 +++--- 5 files changed, 149 insertions(+), 128 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e73a6f76..46c77a89 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v4.3.0 with: python-version: ${{ matrix.python-version }} @@ -28,14 +28,14 @@ jobs: export PATH="$HOME/.poetry/env:$PATH" - name: Set up cache - uses: actions/cache@v3.0.1 + uses: actions/cache@v3.0.11 with: path: .venv key: venv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }} - name: Install dependencies run: | poetry config virtualenvs.in-project true - poetry install + make install-ci - name: Run style checks run: | diff --git a/Makefile b/Makefile index 29c4c05d..d060e1bb 100644 --- a/Makefile +++ b/Makefile @@ -44,15 +44,16 @@ poetry-remove: .PHONY: add-torch-gpu add-torch-gpu: poetry run poe upgrade-pip + poetry run pip uninstall torch -y poetry run poe torch-cuda11 .PHONY: install install: - poetry install --no-dev + poetry install .PHONY: install-dev install-dev: - poetry install --extras all + poetry install --all-extras --with lint,docs --sync # -poetry run mypy --install-types --non-interactive ./ poetry run pre-commit install poetry run pre-commit autoupdate @@ -63,6 +64,10 @@ install-gpu: install add-torch-gpu .PHONY: install-dev-gpu install-dev-gpu: install-dev add-torch-gpu +.PHONY: install-ci +install-ci: + poetry install --with lint + .PHONY: update-deps update-deps: poetry lock && poetry export --without-hashes > requirements.txt diff --git a/poetry.lock b/poetry.lock index aa22b665..3005d99f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -56,11 +56,14 @@ python-versions = ">=3.7.2" [package.dependencies] lazy-object-proxy = ">=1.4.0" typing-extensions = {version = ">=3.10", markers = "python_version < \"3.10\""} -wrapt = {version = ">=1.11,<2", markers = "python_version < \"3.11\""} +wrapt = [ + {version = ">=1.11,<2", markers = "python_version < \"3.11\""}, + {version = ">=1.14,<2", markers = "python_version >= \"3.11\""}, +] [[package]] name = "asttokens" -version = "2.0.8" +version = "2.1.0" description = "Annotate AST trees with source code positions" category = "main" optional = false @@ -232,11 +235,11 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} [[package]] name = "colorama" -version = "0.4.5" +version = "0.4.6" description = "Cross-platform colored terminal text." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" [[package]] name = "commonmark" @@ -312,13 +315,13 @@ xxhash = "*" apache-beam = ["apache-beam (>=2.26.0)"] audio = ["librosa"] benchmarks = ["numpy (==1.18.5)", "tensorflow (==2.3.0)", "torch (==1.7.1)", "transformers (==3.0.2)"] -dev = ["absl-py", "pytest", "pytest-datadir", "pytest-xdist", "apache-beam (>=2.26.0)", "elasticsearch (<8.0.0)", "aiobotocore (>=2.0.1)", "boto3 (>=1.19.8)", "botocore (>=1.22.8)", "faiss-cpu (>=1.6.4)", "fsspec", "lz4", "moto[server,s3] (==2.0.4)", "py7zr", "rarfile (>=4.0)", "s3fs (>=2021.11.1)", "tensorflow (>=2.3,!=2.6.0,!=2.6.1)", "torch", "torchaudio (<0.12.0)", "soundfile", "transformers", "zstandard", "bert-score (>=0.3.6)", "jiwer", "langdetect", "mauve-text", "nltk", "rouge-score", "sacrebleu", "sacremoses", "scikit-learn", "scipy", "sentencepiece", "seqeval", "sqlalchemy", "tldextract", "toml (>=0.10.1)", "requests-file (>=1.5.1)", "tldextract (>=3.1.0)", "texttable (>=1.6.3)", "Werkzeug (>=1.0.1)", "six (>=1.15.0,<1.16.0)", "Pillow (>=6.2.1)", "librosa", "black (>=22.0,<23.0)", "flake8 (>=3.8.3)", "isort (>=5.0.0)", "pyyaml (>=5.3.1)"] +dev = ["absl-py", "pytest", "pytest-datadir", "pytest-xdist", "apache-beam (>=2.26.0)", "elasticsearch (<8.0.0)", "aiobotocore (>=2.0.1)", "boto3 (>=1.19.8)", "botocore (>=1.22.8)", "faiss-cpu (>=1.6.4)", "fsspec", "lz4", "moto[s3,server] (==2.0.4)", "py7zr", "rarfile (>=4.0)", "s3fs (>=2021.11.1)", "tensorflow (>=2.3,!=2.6.0,!=2.6.1)", "torch", "torchaudio (<0.12.0)", "soundfile", "transformers", "zstandard", "bert-score (>=0.3.6)", "jiwer", "langdetect", "mauve-text", "nltk", "rouge-score", "sacrebleu", "sacremoses", "scikit-learn", "scipy", "sentencepiece", "seqeval", "sqlalchemy", "tldextract", "toml (>=0.10.1)", "requests-file (>=1.5.1)", "tldextract (>=3.1.0)", "texttable (>=1.6.3)", "Werkzeug (>=1.0.1)", "six (>=1.15.0,<1.16.0)", "Pillow (>=6.2.1)", "librosa", "black (>=22.0,<23.0)", "flake8 (>=3.8.3)", "isort (>=5.0.0)", "pyyaml (>=5.3.1)"] docs = ["s3fs"] quality = ["black (>=22.0,<23.0)", "flake8 (>=3.8.3)", "isort (>=5.0.0)", "pyyaml (>=5.3.1)"] s3 = ["fsspec", "boto3", "botocore", "s3fs"] tensorflow = ["tensorflow (>=2.2.0,!=2.6.0,!=2.6.1)"] tensorflow_gpu = ["tensorflow-gpu (>=2.2.0,!=2.6.0,!=2.6.1)"] -tests = ["absl-py", "pytest", "pytest-datadir", "pytest-xdist", "apache-beam (>=2.26.0)", "elasticsearch (<8.0.0)", "aiobotocore (>=2.0.1)", "boto3 (>=1.19.8)", "botocore (>=1.22.8)", "faiss-cpu (>=1.6.4)", "fsspec", "lz4", "moto[server,s3] (==2.0.4)", "py7zr", "rarfile (>=4.0)", "s3fs (>=2021.11.1)", "tensorflow (>=2.3,!=2.6.0,!=2.6.1)", "torch", "torchaudio (<0.12.0)", "soundfile", "transformers", "zstandard", "bert-score (>=0.3.6)", "jiwer", "langdetect", "mauve-text", "nltk", "rouge-score", "sacrebleu", "sacremoses", "scikit-learn", "scipy", "sentencepiece", "seqeval", "sqlalchemy", "tldextract", "toml (>=0.10.1)", "requests-file (>=1.5.1)", "tldextract (>=3.1.0)", "texttable (>=1.6.3)", "Werkzeug (>=1.0.1)", "six (>=1.15.0,<1.16.0)", "Pillow (>=6.2.1)", "librosa"] +tests = ["absl-py", "pytest", "pytest-datadir", "pytest-xdist", "apache-beam (>=2.26.0)", "elasticsearch (<8.0.0)", "aiobotocore (>=2.0.1)", "boto3 (>=1.19.8)", "botocore (>=1.22.8)", "faiss-cpu (>=1.6.4)", "fsspec", "lz4", "moto[s3,server] (==2.0.4)", "py7zr", "rarfile (>=4.0)", "s3fs (>=2021.11.1)", "tensorflow (>=2.3,!=2.6.0,!=2.6.1)", "torch", "torchaudio (<0.12.0)", "soundfile", "transformers", "zstandard", "bert-score (>=0.3.6)", "jiwer", "langdetect", "mauve-text", "nltk", "rouge-score", "sacrebleu", "sacremoses", "scikit-learn", "scipy", "sentencepiece", "seqeval", "sqlalchemy", "tldextract", "toml (>=0.10.1)", "requests-file (>=1.5.1)", "tldextract (>=3.1.0)", "texttable (>=1.6.3)", "Werkzeug (>=1.0.1)", "six (>=1.15.0,<1.16.0)", "Pillow (>=6.2.1)", "librosa"] torch = ["torch"] vision = ["Pillow (>=6.2.1)"] @@ -391,14 +394,14 @@ python-versions = ">=3.6" [[package]] name = "executing" -version = "1.1.1" +version = "1.2.0" description = "Get the currently executing AST node of a frame, and other information" category = "main" optional = false python-versions = "*" [package.extras] -tests = ["rich", "littleutils", "pytest", "asttokens"] +tests = ["asttokens", "pytest", "littleutils", "rich"] [[package]] name = "filelock" @@ -427,7 +430,7 @@ pyflakes = ">=2.4.0,<2.5.0" [[package]] name = "fonttools" -version = "4.37.4" +version = "4.38.0" description = "Tools to manipulate font files" category = "main" optional = false @@ -457,7 +460,7 @@ python-versions = ">=3.7" [[package]] name = "fsspec" -version = "2022.8.2" +version = "2022.10.0" description = "File-system specification" category = "main" optional = true @@ -540,7 +543,7 @@ torch = ["torch"] [[package]] name = "identify" -version = "2.5.6" +version = "2.5.8" description = "File identification library for Python" category = "dev" optional = false @@ -591,7 +594,7 @@ python-versions = "*" [[package]] name = "ipykernel" -version = "6.16.0" +version = "6.16.2" description = "IPython Kernel for Jupyter" category = "main" optional = false @@ -611,11 +614,12 @@ tornado = ">=6.1" traitlets = ">=5.1.0" [package.extras] -test = ["flaky", "ipyparallel", "pre-commit", "pytest-cov", "pytest-timeout", "pytest (>=6.0)"] +docs = ["myst-parser", "pydata-sphinx-theme", "sphinx", "sphinxcontrib-github-alt"] +test = ["flaky", "ipyparallel", "pre-commit", "pytest-cov", "pytest-timeout", "pytest (>=7.0)"] [[package]] name = "ipython" -version = "8.5.0" +version = "8.6.0" description = "IPython: Productive Interactive Computing" category = "main" optional = false @@ -636,9 +640,9 @@ stack-data = "*" traitlets = ">=5" [package.extras] -all = ["black", "Sphinx (>=1.3)", "ipykernel", "nbconvert", "nbformat", "ipywidgets", "notebook", "ipyparallel", "qtconsole", "pytest (<7.1)", "pytest-asyncio", "testpath", "curio", "matplotlib (!=3.2.0)", "numpy (>=1.19)", "pandas", "trio"] +all = ["black", "ipykernel", "setuptools (>=18.5)", "sphinx (>=1.3)", "sphinx-rtd-theme", "docrepr", "matplotlib", "stack-data", "pytest (<7)", "typing-extensions", "pytest (<7.1)", "pytest-asyncio", "testpath", "nbconvert", "nbformat", "ipywidgets", "notebook", "ipyparallel", "qtconsole", "curio", "matplotlib (!=3.2.0)", "numpy (>=1.20)", "pandas", "trio"] black = ["black"] -doc = ["Sphinx (>=1.3)"] +doc = ["ipykernel", "setuptools (>=18.5)", "sphinx (>=1.3)", "sphinx-rtd-theme", "docrepr", "matplotlib", "stack-data", "pytest (<7)", "typing-extensions", "pytest (<7.1)", "pytest-asyncio", "testpath"] kernel = ["ipykernel"] nbconvert = ["nbconvert"] nbformat = ["nbformat"] @@ -646,7 +650,7 @@ notebook = ["ipywidgets", "notebook"] parallel = ["ipyparallel"] qtconsole = ["qtconsole"] test = ["pytest (<7.1)", "pytest-asyncio", "testpath"] -test_extra = ["pytest (<7.1)", "pytest-asyncio", "testpath", "curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.19)", "pandas", "trio"] +test_extra = ["pytest (<7.1)", "pytest-asyncio", "testpath", "curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.20)", "pandas", "trio"] [[package]] name = "ipywidgets" @@ -730,7 +734,7 @@ python-versions = "*" [[package]] name = "jupyter-client" -version = "7.4.2" +version = "7.4.4" description = "Jupyter protocol implementation and client libraries" category = "main" optional = false @@ -747,11 +751,11 @@ traitlets = "*" [package.extras] doc = ["ipykernel", "myst-parser", "sphinx-rtd-theme", "sphinx (>=1.3.6)", "sphinxcontrib-github-alt"] -test = ["codecov", "coverage", "ipykernel (>=6.5)", "ipython", "mypy", "pre-commit", "pytest", "pytest-asyncio (>=0.18)", "pytest-cov", "pytest-timeout"] +test = ["codecov", "coverage", "ipykernel (>=6.12)", "ipython", "mypy", "pre-commit", "pytest", "pytest-asyncio (>=0.18)", "pytest-cov", "pytest-timeout"] [[package]] name = "jupyter-core" -version = "4.11.1" +version = "4.11.2" description = "Jupyter core package. A base package on which Jupyter projects rely." category = "main" optional = false @@ -782,11 +786,11 @@ python-versions = ">=3.7" [[package]] name = "lazy-object-proxy" -version = "1.7.1" +version = "1.8.0" description = "A fast and thorough lazy object proxy." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [[package]] name = "markdown" @@ -917,6 +921,38 @@ category = "main" optional = false python-versions = ">=3.8" +[[package]] +name = "nvidia-cublas-cu11" +version = "11.10.3.66" +description = "CUBLAS native runtime libraries" +category = "main" +optional = false +python-versions = ">=3" + +[[package]] +name = "nvidia-cuda-nvrtc-cu11" +version = "11.7.99" +description = "NVRTC native runtime libraries" +category = "main" +optional = false +python-versions = ">=3" + +[[package]] +name = "nvidia-cuda-runtime-cu11" +version = "11.7.99" +description = "CUDA Runtime native Libraries" +category = "main" +optional = false +python-versions = ">=3" + +[[package]] +name = "nvidia-cudnn-cu11" +version = "8.5.0.96" +description = "cuDNN runtime libraries" +category = "main" +optional = false +python-versions = ">=3" + [[package]] name = "packaging" version = "21.3" @@ -977,7 +1013,7 @@ python-versions = ">=3.7" [[package]] name = "pbr" -version = "5.10.0" +version = "5.11.0" description = "Python Build Reasonableness" category = "dev" optional = false @@ -1004,7 +1040,7 @@ python-versions = "*" [[package]] name = "pillow" -version = "9.2.0" +version = "9.3.0" description = "Python Imaging Library (Fork)" category = "main" optional = false @@ -1128,7 +1164,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "pyarrow" -version = "9.0.0" +version = "10.0.0" description = "Python library for Apache Arrow" category = "main" optional = true @@ -1188,14 +1224,14 @@ plugins = ["importlib-metadata"] [[package]] name = "pylint" -version = "2.15.4" +version = "2.15.5" description = "python code static checker" category = "dev" optional = false python-versions = ">=3.7.2" [package.dependencies] -astroid = ">=2.12.11,<=2.14.0-dev0" +astroid = ">=2.12.12,<=2.14.0-dev0" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} dill = ">=0.2" isort = ">=4.2.5,<6" @@ -1385,7 +1421,7 @@ requests = "*" [[package]] name = "scikit-learn" -version = "1.1.2" +version = "1.1.3" description = "A set of python modules for machine learning and data mining" category = "main" optional = true @@ -1398,14 +1434,14 @@ scipy = ">=1.3.2" threadpoolctl = ">=2.0.0" [package.extras] -tests = ["numpydoc (>=1.2.0)", "pyamg (>=4.0.0)", "mypy (>=0.961)", "black (>=22.3.0)", "flake8 (>=3.8.2)", "pytest-cov (>=2.9.0)", "pytest (>=5.0.1)", "pandas (>=1.0.5)", "scikit-image (>=0.16.2)", "matplotlib (>=3.1.2)"] -examples = ["seaborn (>=0.9.0)", "pandas (>=1.0.5)", "scikit-image (>=0.16.2)", "matplotlib (>=3.1.2)"] -docs = ["sphinxext-opengraph (>=0.4.2)", "sphinx-prompt (>=1.3.0)", "Pillow (>=7.1.2)", "numpydoc (>=1.2.0)", "sphinx-gallery (>=0.7.0)", "sphinx (>=4.0.1)", "memory-profiler (>=0.57.0)", "seaborn (>=0.9.0)", "pandas (>=1.0.5)", "scikit-image (>=0.16.2)", "matplotlib (>=3.1.2)"] -benchmark = ["memory-profiler (>=0.57.0)", "pandas (>=1.0.5)", "matplotlib (>=3.1.2)"] +benchmark = ["matplotlib (>=3.1.2)", "pandas (>=1.0.5)", "memory-profiler (>=0.57.0)"] +docs = ["matplotlib (>=3.1.2)", "scikit-image (>=0.16.2)", "pandas (>=1.0.5)", "seaborn (>=0.9.0)", "memory-profiler (>=0.57.0)", "sphinx (>=4.0.1)", "sphinx-gallery (>=0.7.0)", "numpydoc (>=1.2.0)", "Pillow (>=7.1.2)", "sphinx-prompt (>=1.3.0)", "sphinxext-opengraph (>=0.4.2)"] +examples = ["matplotlib (>=3.1.2)", "scikit-image (>=0.16.2)", "pandas (>=1.0.5)", "seaborn (>=0.9.0)"] +tests = ["matplotlib (>=3.1.2)", "scikit-image (>=0.16.2)", "pandas (>=1.0.5)", "pytest (>=5.0.1)", "pytest-cov (>=2.9.0)", "flake8 (>=3.8.2)", "black (>=22.3.0)", "mypy (>=0.961)", "pyamg (>=4.0.0)", "numpydoc (>=1.2.0)"] [[package]] name = "scipy" -version = "1.9.2" +version = "1.9.3" description = "Fundamental algorithms for scientific computing in Python" category = "main" optional = false @@ -1649,23 +1685,23 @@ sphinx = ">=2.0" [[package]] name = "stack-data" -version = "0.5.1" +version = "0.6.0" description = "Extract data from python stack frames and tracebacks for informative displays" category = "main" optional = false python-versions = "*" [package.dependencies] -asttokens = "*" -executing = "*" +asttokens = ">=2.1.0" +executing = ">=1.2.0" pure-eval = "*" [package.extras] -tests = ["cython", "littleutils", "pygments", "typeguard", "pytest"] +tests = ["pytest", "typeguard", "pygments", "littleutils", "cython"] [[package]] name = "stevedore" -version = "4.0.1" +version = "4.1.0" description = "Manage dynamic plugins for Python applications" category = "dev" optional = false @@ -1721,23 +1757,30 @@ python-versions = ">=3.7" [[package]] name = "tomlkit" -version = "0.11.5" +version = "0.11.6" description = "Style preserving TOML library" category = "dev" optional = false -python-versions = ">=3.6,<4.0" +python-versions = ">=3.6" [[package]] name = "torch" -version = "1.12.1" +version = "1.13.0" description = "Tensors and Dynamic neural networks in Python with strong GPU acceleration" category = "main" optional = false python-versions = ">=3.7.0" [package.dependencies] +nvidia-cublas-cu11 = "11.10.3.66" +nvidia-cuda-nvrtc-cu11 = "11.7.99" +nvidia-cuda-runtime-cu11 = "11.7.99" +nvidia-cudnn-cu11 = "8.5.0.96" typing-extensions = "*" +[package.extras] +opt-einsum = ["opt-einsum (>=3.3)"] + [[package]] name = "torchtyping" version = "0.1.4" @@ -1887,19 +1930,19 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] name = "virtualenv" -version = "20.16.5" +version = "20.16.6" description = "Virtual Python Environment builder" category = "dev" optional = false python-versions = ">=3.6" [package.dependencies] -distlib = ">=0.3.5,<1" +distlib = ">=0.3.6,<1" filelock = ">=3.4.1,<4" platformdirs = ">=2.4,<3" [package.extras] -docs = ["proselint (>=0.13)", "sphinx (>=5.1.1)", "sphinx-argparse (>=0.3.1)", "sphinx-rtd-theme (>=1)", "towncrier (>=21.9)"] +docs = ["proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-argparse (>=0.3.2)", "sphinx-rtd-theme (>=1)", "towncrier (>=22.8)"] testing = ["coverage (>=6.2)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=21.3)", "pytest (>=7.0.1)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.2)", "pytest-mock (>=3.6.1)", "pytest-randomly (>=3.10.3)", "pytest-timeout (>=2.1)"] [[package]] @@ -1948,7 +1991,7 @@ multidict = ">=4.0" [[package]] name = "zipp" -version = "3.9.0" +version = "3.10.0" description = "Backport of pathlib-compatible object wrapper for zip files" category = "main" optional = false @@ -1965,8 +2008,8 @@ scikit-learn = ["scikit-learn"] [metadata] lock-version = "1.1" -python-versions = ">=3.8,<3.11" -content-hash = "cbf202a7de6646b40fdccb59139c3722786ccb68c781fb4549f520cb329fe155" +python-versions = ">=3.8,<3.12" +content-hash = "6e9fc766672ffd104e6c3220f41eccf6b406de2aeaad67231d8012207444131b" [metadata.files] aiohttp = [] @@ -2096,45 +2139,7 @@ jupyter-client = [] jupyter-core = [] jupyterlab-widgets = [] kiwisolver = [] -lazy-object-proxy = [ - {file = "lazy-object-proxy-1.7.1.tar.gz", hash = "sha256:d609c75b986def706743cdebe5e47553f4a5a1da9c5ff66d76013ef396b5a8a4"}, - {file = "lazy_object_proxy-1.7.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bb8c5fd1684d60a9902c60ebe276da1f2281a318ca16c1d0a96db28f62e9166b"}, - {file = "lazy_object_proxy-1.7.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a57d51ed2997e97f3b8e3500c984db50a554bb5db56c50b5dab1b41339b37e36"}, - {file = "lazy_object_proxy-1.7.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd45683c3caddf83abbb1249b653a266e7069a09f486daa8863fb0e7496a9fdb"}, - {file = "lazy_object_proxy-1.7.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:8561da8b3dd22d696244d6d0d5330618c993a215070f473b699e00cf1f3f6443"}, - {file = "lazy_object_proxy-1.7.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fccdf7c2c5821a8cbd0a9440a456f5050492f2270bd54e94360cac663398739b"}, - {file = "lazy_object_proxy-1.7.1-cp310-cp310-win32.whl", hash = "sha256:898322f8d078f2654d275124a8dd19b079080ae977033b713f677afcfc88e2b9"}, - {file = "lazy_object_proxy-1.7.1-cp310-cp310-win_amd64.whl", hash = "sha256:85b232e791f2229a4f55840ed54706110c80c0a210d076eee093f2b2e33e1bfd"}, - {file = "lazy_object_proxy-1.7.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:46ff647e76f106bb444b4533bb4153c7370cdf52efc62ccfc1a28bdb3cc95442"}, - {file = "lazy_object_proxy-1.7.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:12f3bb77efe1367b2515f8cb4790a11cffae889148ad33adad07b9b55e0ab22c"}, - {file = "lazy_object_proxy-1.7.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c19814163728941bb871240d45c4c30d33b8a2e85972c44d4e63dd7107faba44"}, - {file = "lazy_object_proxy-1.7.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:e40f2013d96d30217a51eeb1db28c9ac41e9d0ee915ef9d00da639c5b63f01a1"}, - {file = "lazy_object_proxy-1.7.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:2052837718516a94940867e16b1bb10edb069ab475c3ad84fd1e1a6dd2c0fcfc"}, - {file = "lazy_object_proxy-1.7.1-cp36-cp36m-win32.whl", hash = "sha256:6a24357267aa976abab660b1d47a34aaf07259a0c3859a34e536f1ee6e76b5bb"}, - {file = "lazy_object_proxy-1.7.1-cp36-cp36m-win_amd64.whl", hash = "sha256:6aff3fe5de0831867092e017cf67e2750c6a1c7d88d84d2481bd84a2e019ec35"}, - {file = "lazy_object_proxy-1.7.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:6a6e94c7b02641d1311228a102607ecd576f70734dc3d5e22610111aeacba8a0"}, - {file = "lazy_object_proxy-1.7.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c4ce15276a1a14549d7e81c243b887293904ad2d94ad767f42df91e75fd7b5b6"}, - {file = "lazy_object_proxy-1.7.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e368b7f7eac182a59ff1f81d5f3802161932a41dc1b1cc45c1f757dc876b5d2c"}, - {file = "lazy_object_proxy-1.7.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:6ecbb350991d6434e1388bee761ece3260e5228952b1f0c46ffc800eb313ff42"}, - {file = "lazy_object_proxy-1.7.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:553b0f0d8dbf21890dd66edd771f9b1b5f51bd912fa5f26de4449bfc5af5e029"}, - {file = "lazy_object_proxy-1.7.1-cp37-cp37m-win32.whl", hash = "sha256:c7a683c37a8a24f6428c28c561c80d5f4fd316ddcf0c7cab999b15ab3f5c5c69"}, - {file = "lazy_object_proxy-1.7.1-cp37-cp37m-win_amd64.whl", hash = "sha256:df2631f9d67259dc9620d831384ed7732a198eb434eadf69aea95ad18c587a28"}, - {file = "lazy_object_proxy-1.7.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:07fa44286cda977bd4803b656ffc1c9b7e3bc7dff7d34263446aec8f8c96f88a"}, - {file = "lazy_object_proxy-1.7.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4dca6244e4121c74cc20542c2ca39e5c4a5027c81d112bfb893cf0790f96f57e"}, - {file = "lazy_object_proxy-1.7.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:91ba172fc5b03978764d1df5144b4ba4ab13290d7bab7a50f12d8117f8630c38"}, - {file = "lazy_object_proxy-1.7.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:043651b6cb706eee4f91854da4a089816a6606c1428fd391573ef8cb642ae4f7"}, - {file = "lazy_object_proxy-1.7.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b9e89b87c707dd769c4ea91f7a31538888aad05c116a59820f28d59b3ebfe25a"}, - {file = "lazy_object_proxy-1.7.1-cp38-cp38-win32.whl", hash = "sha256:9d166602b525bf54ac994cf833c385bfcc341b364e3ee71e3bf5a1336e677b55"}, - {file = "lazy_object_proxy-1.7.1-cp38-cp38-win_amd64.whl", hash = "sha256:8f3953eb575b45480db6568306893f0bd9d8dfeeebd46812aa09ca9579595148"}, - {file = "lazy_object_proxy-1.7.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:dd7ed7429dbb6c494aa9bc4e09d94b778a3579be699f9d67da7e6804c422d3de"}, - {file = "lazy_object_proxy-1.7.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:70ed0c2b380eb6248abdef3cd425fc52f0abd92d2b07ce26359fcbc399f636ad"}, - {file = "lazy_object_proxy-1.7.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7096a5e0c1115ec82641afbdd70451a144558ea5cf564a896294e346eb611be1"}, - {file = "lazy_object_proxy-1.7.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:f769457a639403073968d118bc70110e7dce294688009f5c24ab78800ae56dc8"}, - {file = "lazy_object_proxy-1.7.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:39b0e26725c5023757fc1ab2a89ef9d7ab23b84f9251e28f9cc114d5b59c1b09"}, - {file = "lazy_object_proxy-1.7.1-cp39-cp39-win32.whl", hash = "sha256:2130db8ed69a48a3440103d4a520b89d8a9405f1b06e2cc81640509e8bf6548f"}, - {file = "lazy_object_proxy-1.7.1-cp39-cp39-win_amd64.whl", hash = "sha256:677ea950bef409b47e51e733283544ac3d660b709cfce7b187f5ace137960d61"}, - {file = "lazy_object_proxy-1.7.1-pp37.pp38-none-any.whl", hash = "sha256:d66906d5785da8e0be7360912e99c9188b70f52c422f9fc18223347235691a84"}, -] +lazy-object-proxy = [] markdown = [] markupsafe = [ {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"}, @@ -2300,6 +2305,10 @@ mypy-extensions = [ nest-asyncio = [] nodeenv = [] numpy = [] +nvidia-cublas-cu11 = [] +nvidia-cuda-nvrtc-cu11 = [] +nvidia-cuda-runtime-cu11 = [] +nvidia-cudnn-cu11 = [] packaging = [ {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, diff --git a/pyproject.toml b/pyproject.toml index 1819f9cc..b29b497f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ # Poetry pyproject.toml: https://python-poetry.org/docs/pyproject/ [build-system] -requires = ["poetry_core>=1.0.0"] +requires = ["poetry_core>=1.2.0"] build-backend = "poetry.core.masonry.api" [tool.poetry] @@ -36,6 +36,7 @@ classifiers = [ #! Update me "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", ] [tool.poetry.scripts] @@ -43,19 +44,20 @@ classifiers = [ #! Update me "inseq" = "inseq.commands.cli:main" [tool.poetry.dependencies] -python = ">=3.8,<3.11" +python = ">=3.8,<3.12" rich = "^10.13.0" -transformers = { version = "^4.20.1", extras = ["sentencepiece", "tokenizers", "torch", "torchhub"] } +transformers = { version = "^4.20.1", extras = ["sentencepiece", "tokenizers", "torch"] } protobuf = "^3.20.2" captum = "^0.5.0" numpy = "^1.22.4" torchtyping = "^0.1.4" json-tricks = "^3.15.5" -torch = "^1.12.0" +torch = "^1.13.0" scipy = "^1.8.1" matplotlib = "^3.5.2" tqdm = "^4.64.0" +ipykernel = "^6.15.0" ipywidgets = "^8.0.0rc2" poethepoet = "^0.13.1" joblib = "^1.2.0" @@ -63,22 +65,11 @@ joblib = "^1.2.0" scikit-learn = { version = "^1.1.1", optional = true } datasets = { version = "^2.3.2", optional = true, extras = ["torch"] } -[tool.poetry.dev-dependencies] -bandit = "^1.7.4" -black = "^22.6.0" -darglint = "^1.8.1" -flake8 = "^4.0.1" -ipykernel = "^6.15.0" -isort = {extras = ["colors"], version = "^5.10.1"} -mypy = "^0.910" -mypy-extensions = "^0.4.3" -pre-commit = "^2.19.0" -pydocstyle = "^6.1.1" -pylint = "^2.14.1" -pytest = "^6.2.5" -pyupgrade = "^2.34.0" +[tool.poetry.group.docs] +optional = true + +[tool.poetry.group.docs.dependencies] recommonmark = "^0.7.1" -safety = "^1.10.3" sphinx = "^5.3.0" sphinxemoji = "^0.2.0" sphinxext-opengraph = "^0.4.2" @@ -87,17 +78,28 @@ sphinx-gitstamp = "^0.3.2" sphinx-markdown-tables = "^0.0.17" sphinx-rtd-theme = "^1.0.0" +[tool.poetry.group.lint] +optional = true + +[tool.poetry.group.lint.dependencies] +bandit = "^1.7.4" +safety = "^1.10.3" +black = "^22.6.0" +darglint = "^1.8.1" +flake8 = "^4.0.1" +isort = {extras = ["colors"], version = "^5.10.1"} +pre-commit = "^2.19.0" +pylint = "^2.14.1" +pyupgrade = "^2.34.0" +pytest = "^6.2.5" + [tool.poetry.extras] scikit-learn = ["scikit-learn"] datasets = ["datasets"] -all = [ - "scikit-learn", - "datasets", -] [tool.poe.tasks] upgrade-pip = "python -m pip install --upgrade pip" -torch-cpu = "python -m pip install torch==1.12.0+cpu -f https://download.pytorch.org/whl/torch_stable.html" +torch-cpu = "python -m pip install torch==1.13.0+cpu -f https://download.pytorch.org/whl/torch_stable.html" torch-cuda11 = "python -m pip install torch --extra-index-url https://download.pytorch.org/whl/cu116" [tool.black] diff --git a/requirements.txt b/requirements.txt index a5da8d5f..d9ecd70b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,42 +1,47 @@ appnope==0.1.3; platform_system == "Darwin" and python_version >= "3.8" and sys_platform == "darwin" -asttokens==2.0.8; python_version >= "3.8" +asttokens==2.1.0; python_version >= "3.8" backcall==0.2.0; python_version >= "3.8" captum==0.5.0; python_version >= "3.6" certifi==2022.9.24; python_version >= "3.7" and python_version < "4" and python_full_version >= "3.7.0" cffi==1.15.1; implementation_name == "pypy" and python_version >= "3.7" charset-normalizer==2.1.1; python_version >= "3.7" and python_version < "4" and python_full_version >= "3.7.0" -colorama==0.4.5; python_full_version >= "3.7.0" and python_full_version < "4.0.0" and platform_system == "Windows" and (python_version >= "3.8" and python_full_version < "3.0.0" and sys_platform == "win32" or sys_platform == "win32" and python_version >= "3.8" and python_full_version >= "3.5.0") +colorama==0.4.6; python_full_version >= "3.7.0" and python_full_version < "4.0.0" and platform_system == "Windows" and (python_version >= "3.8" and python_full_version < "3.0.0" and sys_platform == "win32" or sys_platform == "win32" and python_version >= "3.8" and python_full_version >= "3.7.0") commonmark==0.9.1; python_full_version >= "3.6.2" and python_full_version < "4.0.0" contourpy==1.0.5; python_version >= "3.8" cycler==0.11.0; python_version >= "3.8" debugpy==1.6.3; python_version >= "3.7" decorator==5.1.1; python_version >= "3.8" entrypoints==0.4; python_version >= "3.7" -executing==1.1.1; python_version >= "3.8" +executing==1.2.0; python_version >= "3.8" filelock==3.8.0; python_version >= "3.7" and python_full_version >= "3.7.0" -fonttools==4.37.4; python_version >= "3.8" +fonttools==4.38.0; python_version >= "3.8" huggingface-hub==0.10.1; python_full_version >= "3.7.0" idna==3.4; python_version >= "3.7" and python_version < "4" and python_full_version >= "3.7.0" importlib-metadata==5.0.0; python_full_version >= "3.7.0" and python_version >= "3.7" -ipykernel==6.16.0; python_version >= "3.7" -ipython==8.5.0; python_version >= "3.8" +ipykernel==6.16.2; python_version >= "3.7" +ipython==8.6.0; python_version >= "3.8" ipywidgets==8.0.2; python_version >= "3.7" jedi==0.18.1; python_version >= "3.8" +joblib==1.2.0; python_version >= "3.7" json-tricks==3.15.5 -jupyter-client==7.4.2; python_version >= "3.7" -jupyter-core==4.11.1; python_version >= "3.7" +jupyter-client==7.4.4; python_version >= "3.7" +jupyter-core==4.11.2; python_version >= "3.7" jupyterlab-widgets==3.0.3; python_version >= "3.7" kiwisolver==1.4.4; python_version >= "3.8" matplotlib-inline==0.1.6; python_version >= "3.8" matplotlib==3.6.1; python_version >= "3.8" nest-asyncio==1.5.6; python_version >= "3.7" numpy==1.23.4; python_version >= "3.8" +nvidia-cublas-cu11==11.10.3.66; python_full_version >= "3.7.0" and python_version >= "3.6" +nvidia-cuda-nvrtc-cu11==11.7.99; python_full_version >= "3.7.0" and python_version >= "3.6" +nvidia-cuda-runtime-cu11==11.7.99; python_full_version >= "3.7.0" and python_version >= "3.6" +nvidia-cudnn-cu11==8.5.0.96; python_full_version >= "3.7.0" and python_version >= "3.6" packaging==21.3; python_version >= "3.8" and python_full_version >= "3.7.0" parso==0.8.3; python_version >= "3.8" pastel==0.2.1; python_full_version >= "3.6.2" pexpect==4.8.0; sys_platform != "win32" and python_version >= "3.8" pickleshare==0.7.5; python_version >= "3.8" -pillow==9.2.0; python_version >= "3.8" +pillow==9.3.0; python_version >= "3.8" poethepoet==0.13.1; python_full_version >= "3.6.2" prompt-toolkit==3.0.31; python_full_version >= "3.6.2" and python_version >= "3.8" protobuf==3.20.2; python_version >= "3.7" @@ -54,14 +59,14 @@ pyzmq==24.0.1; python_version >= "3.7" regex==2022.9.13; python_version >= "3.6" and python_full_version >= "3.7.0" requests==2.28.1; python_version >= "3.7" and python_version < "4" and python_full_version >= "3.7.0" rich==10.16.2; python_full_version >= "3.6.2" and python_full_version < "4.0.0" -scipy==1.9.2; python_version >= "3.8" +scipy==1.9.3; python_version >= "3.8" sentencepiece==0.1.97; python_full_version >= "3.7.0" setuptools-scm==7.0.5; python_version >= "3.8" six==1.16.0; python_version >= "3.8" and python_full_version < "3.0.0" or python_full_version >= "3.3.0" and python_version >= "3.8" -stack-data==0.5.1; python_version >= "3.8" +stack-data==0.6.0; python_version >= "3.8" tokenizers==0.13.1; python_full_version >= "3.7.0" tomli==2.0.1; python_version >= "3.8" and python_full_version >= "3.6.2" -torch==1.12.1; python_full_version >= "3.7.0" +torch==1.13.0; python_full_version >= "3.7.0" torchtyping==0.1.4; python_full_version >= "3.7.0" tornado==6.2; python_version >= "3.7" tqdm==4.64.1; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.4.0") @@ -72,4 +77,4 @@ typing-extensions==4.4.0; python_full_version >= "3.7.0" and python_version >= " urllib3==1.26.12; python_full_version >= "3.7.0" and python_version < "4" and python_version >= "3.7" wcwidth==0.2.5; python_full_version >= "3.6.2" and python_version >= "3.8" widgetsnbextension==4.0.3; python_version >= "3.7" -zipp==3.9.0; python_full_version >= "3.7.0" and python_version >= "3.7" +zipp==3.10.0; python_full_version >= "3.7.0" and python_version >= "3.7"