From da702691b1bdcd7a5962c46af609e1778e6e9f45 Mon Sep 17 00:00:00 2001 From: Geoff Pleiss <824157+gpleiss@users.noreply.github.com> Date: Wed, 29 Jan 2025 07:56:09 -0800 Subject: [PATCH] Version bump (#2627) --- .conda/meta.yaml | 9 +++++---- .github/workflows/deploy.yml | 4 ++-- .github/workflows/run_test_suite.yml | 16 +++++++++------- .readthedocs.yml | 7 ++++--- CONTRIBUTING.md | 2 +- README.md | 4 ++-- docs/source/conf.py | 9 ++++----- setup.py | 7 +++---- 8 files changed, 30 insertions(+), 28 deletions(-) diff --git a/.conda/meta.yaml b/.conda/meta.yaml index 7bf9d09ce..33cc960ee 100644 --- a/.conda/meta.yaml +++ b/.conda/meta.yaml @@ -17,14 +17,15 @@ build: requirements: host: - - python>=3.8 + - python>=3.10 run: - - python>=3.8 + - python>=3.10 + - jaxtyping + - linear_operator>=0.6 + - mpmath>=0.19,<=1.3 - pytorch>=2.0 - scikit-learn - - jaxtyping==0.2.19 - - linear_operator>=0.5.3 test: imports: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1e04bf0b6..5b2577bf7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: "3.8" + python-version: "3.10" - name: Install dependencies run: | python -m pip install --upgrade pip @@ -41,7 +41,7 @@ jobs: - uses: conda-incubator/setup-miniconda@v2 with: auto-update-conda: false - python-version: "3.8" + python-version: "3.10" - name: Install dependencies run: | conda install -y anaconda-client conda-build diff --git a/.github/workflows/run_test_suite.yml b/.github/workflows/run_test_suite.yml index c8a0519d9..842bce5e0 100644 --- a/.github/workflows/run_test_suite.yml +++ b/.github/workflows/run_test_suite.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: "3.8" + python-version: "3.10" - name: Install dependencies run: | pip install flake8==4.0.1 flake8-print==4.0.0 pre-commit @@ -37,20 +37,21 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - pytorch-version: ["master", "stable"] + pytorch-version: ["main", "stable"] extras: ["with-extras", "no-extras"] steps: - uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v2 with: - python-version: "3.8" + python-version: "3.10" - name: Install dependencies run: | - if [[ ${{ matrix.pytorch-version }} = "master" ]]; then + if [[ ${{ matrix.pytorch-version }} = "main" ]]; then pip install --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html; else - pip install torch==2.0.1 --index-url https://download.pytorch.org/whl/cpu + pip install "numpy<2" # Numpy 2.0 is not fully supported until PyTorch 2.2 + pip install torch==2.0+cpu -f https://download.pytorch.org/whl/torch_stable.html fi pip install -e . if [[ ${{ matrix.extras }} == "with-extras" ]]; then @@ -69,10 +70,11 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: "3.8" + python-version: "3.10" - name: Install dependencies run: | - pip install torch==1.11+cpu -f https://download.pytorch.org/whl/torch_stable.html + pip install "numpy<2" # Numpy 2.0 is not fully supported until PyTorch 2.2 + pip install torch==2.0+cpu -f https://download.pytorch.org/whl/torch_stable.html pip install pytest nbval jupyter tqdm matplotlib torchvision scipy pip install -e . pip install "pyro-ppl>=1.8"; diff --git a/.readthedocs.yml b/.readthedocs.yml index 153e5cf82..f732e238f 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,10 +8,11 @@ version: 2 build: os: "ubuntu-22.04" tools: - python: "3.8" + python: "3.10" jobs: - pre_install: # Lock version of torch at 1.11 - - pip install torch==1.11.0+cpu -f https://download.pytorch.org/whl/torch_stable.html + pre_install: # Lock version of torch at 2.0 + - pip install "numpy<2" # Numpy 2.0 is not fully supported until PyTorch 2.2 + - pip install torch==2.0+cpu -f https://download.pytorch.org/whl/torch_stable.html pre_build: - python -m setuptools_scm # Get correct version number diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c5dcd2f3f..f67548dce 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,7 +36,7 @@ We use [standard sphinx docstrings](https://sphinx-rtd-tutorial.readthedocs.io/e ### Type Hints -GPyTorch aims to be fully typed using Python 3.8+ +GPyTorch aims to be fully typed using Python 3.10+ [type hints](https://www.python.org/dev/peps/pep-0484/). We recognize that we have a long way to go towards fully typing the library, diff --git a/README.md b/README.md index 498206039..6d018f8f6 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![Documentation Status](https://readthedocs.org/projects/gpytorch/badge/?version=latest)](https://gpytorch.readthedocs.io/en/latest/?badge=latest) [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE) -[![Python Version](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/) +[![Python Version](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/) [![Conda](https://img.shields.io/conda/v/gpytorch/gpytorch.svg)](https://anaconda.org/gpytorch/gpytorch) [![PyPI](https://img.shields.io/pypi/v/gpytorch.svg)](https://pypi.org/project/gpytorch) @@ -29,7 +29,7 @@ See our [**documentation, examples, tutorials**](https://gpytorch.readthedocs.io ## Installation **Requirements**: -- Python >= 3.8 +- Python >= 3.10 - PyTorch >= 2.0 Install GPyTorch using pip or conda: diff --git a/docs/source/conf.py b/docs/source/conf.py index ec10b7878..2ae1e211a 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -21,7 +21,6 @@ import warnings import jaxtyping -from uncompyle6.semantics.fragments import code_deparse def read(*names, **kwargs): @@ -265,15 +264,15 @@ def _convert_internal_and_external_class_to_strings(annotation): # Convert jaxtyping dimensions into strings def _dim_to_str(dim): - if isinstance(dim, jaxtyping.array_types._NamedVariadicDim): + if isinstance(dim, jaxtyping._array_types._NamedVariadicDim): return "..." - elif isinstance(dim, jaxtyping.array_types._FixedDim): + elif isinstance(dim, jaxtyping._array_types._FixedDim): res = str(dim.size) if dim.broadcastable: res = "#" + res return res - elif isinstance(dim, jaxtyping.array_types._SymbolicDim): - expr = code_deparse(dim.expr).text.strip().split("return ")[1] + elif isinstance(dim, jaxtyping._array_types._SymbolicDim): + expr = dim.elem return f"({expr})" elif "jaxtyping" not in str(dim.__class__): # Probably the case that we have an ellipsis return "..." diff --git a/setup.py b/setup.py index 829d0a7d5..b824827d5 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ from setuptools import find_packages, setup REQUIRED_MAJOR = 3 -REQUIRED_MINOR = 8 +REQUIRED_MINOR = 10 # Check for python version if sys.version_info < (REQUIRED_MAJOR, REQUIRED_MINOR): @@ -43,7 +43,7 @@ def find_version(*file_paths): "mpmath>=0.19,<=1.3", # avoid incompatibiltiy with torch+sympy with mpmath 1.4 "scikit-learn", "scipy>=1.6.0", - "linear_operator>=0.5.3", + "linear_operator>=0.6", ] # if recent dev version of PyTorch is installed, no need to install stable try: @@ -72,7 +72,7 @@ def find_version(*file_paths): license="MIT", classifiers=["Development Status :: 5 - Production/Stable", "Programming Language :: Python :: 3"], packages=find_packages(exclude=["test", "test.*"]), - python_requires=">=3.8", + python_requires=f">={REQUIRED_MAJOR}.{REQUIRED_MINOR}", install_requires=install_requires, extras_require={ "dev": ["pre-commit", "setuptools_scm", "twine", "ufmt"], @@ -89,7 +89,6 @@ def find_version(*file_paths): "sphinx<=6.2.1", "sphinx_autodoc_typehints<=1.23.0", "sphinx_rtd_theme<0.5", - "uncompyle6<=3.9.0", ], "examples": ["ipython", "jupyter", "matplotlib", "scipy", "torchvision", "tqdm"], "keops": ["pykeops>=1.1.1"],