Skip to content

Commit 3763b6e

Browse files
authored
Merge pull request #108 from cornellius-gp/version_bump
Version bump
2 parents d809345 + ad8e223 commit 3763b6e

10 files changed

Lines changed: 36 additions & 27 deletions

File tree

.conda/meta.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ build:
1717

1818
requirements:
1919
host:
20-
- python>=3.8
20+
- python>=3.10
2121

2222
run:
23-
- python>=3.8
24-
- pytorch>=1.11
23+
- python>=3.10
24+
- jaxtyping
25+
- mpmath>=0.19,<=1.3
26+
- pytorch>=2.0
2527
- scipy
26-
- jaxtyping==0.2.19
2728

2829
test:
2930
imports:

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Set up Python
2323
uses: actions/setup-python@v2
2424
with:
25-
python-version: "3.8"
25+
python-version: "3.10"
2626
- name: Install dependencies
2727
run: |
2828
python -m pip install --upgrade pip
@@ -44,7 +44,7 @@ jobs:
4444
- uses: conda-incubator/setup-miniconda@v2
4545
with:
4646
auto-update-conda: false
47-
python-version: "3.8"
47+
python-version: "3.10"
4848
- name: Install dependencies
4949
run: |
5050
conda install -y anaconda-client conda-build

.github/workflows/run_linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Set up Python
1515
uses: actions/setup-python@v2
1616
with:
17-
python-version: "3.8"
17+
python-version: "3.10"
1818
- name: Install dependencies
1919
run: |
2020
pip install flake8==5.0.4 flake8-print==5.0.0 pre-commit

.github/workflows/run_test_suite.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Python
1818
uses: actions/setup-python@v2
1919
with:
20-
python-version: "3.8"
20+
python-version: "3.10"
2121
- name: Install dependencies
2222
run: |
2323
if [[ ${{ matrix.pytorch-version }} = "latest" ]]; then

.github/workflows/run_type_checked_test_suite.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
if [[ ${{ matrix.pytorch-version }} = "latest" ]]; then
2828
pip install --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
2929
else
30-
pip install torch==1.11+cpu -f https://download.pytorch.org/whl/torch_stable.html
30+
pip install torch==2.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
3131
pip install "numpy<2"
3232
fi
3333
pip install -e ".[test]"

.readthedocs.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ version: 2
88
build:
99
os: "ubuntu-22.04"
1010
tools:
11-
python: "3.8"
11+
python: "3.10"
1212
jobs:
13-
pre_install: # Lock version of torch at 1.11
14-
- pip install torch==1.11.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
13+
pre_install: # Lock version of torch at 2.0
14+
- pip install "numpy<2" # Numpy 2.0 is not fully supported until PyTorch 2.2
15+
- pip install torch==2.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
1516
pre_build:
1617
- python -m setuptools_scm # Get correct version number
1718

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ We use [standard sphinx docstrings](https://sphinx-rtd-tutorial.readthedocs.io/e
3636

3737
### Type Hints
3838

39-
LinearOperator aims to be fully typed using Python 3.8+
39+
LinearOperator aims to be fully typed using Python 3.10+
4040
[type hints](https://www.python.org/dev/peps/pep-0484/).
4141
We expect any contributions to also use proper type annotations.
4242
We are using [jaxtyping](https://github.com/google/jaxtyping) to help us be declarative about the dimension sizes used

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![Documentation](https://readthedocs.org/projects/linear-operator/badge/?version=latest)](https://linear-operator.readthedocs.io/en/latest/?badge=latest)
55
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
66

7-
[![Python Version](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
7+
[![Python Version](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
88
[![Conda](https://img.shields.io/conda/v/gpytorch/linear_operator.svg)](https://anaconda.org/gpytorch/linear_operator)
99
[![PyPI](https://img.shields.io/pypi/v/linear_operator.svg)](https://pypi.org/project/linear_operator)
1010

@@ -359,7 +359,7 @@ See the documentation for a [full list of supported composition and decoration o
359359

360360
## Installation
361361

362-
LinearOperator requires Python >= 3.8.
362+
LinearOperator requires Python >= 3.10.
363363

364364
### Standard Installation (Most Recent Stable Version)
365365
We recommend installing via `pip` or Anaconda:
@@ -371,7 +371,7 @@ conda install linear_operator -c gpytorch
371371
```
372372

373373
The installation requires the following packages:
374-
- PyTorch >= 1.11
374+
- PyTorch >= 2.0
375375
- Scipy
376376

377377
You can customize your PyTorch installation (i.e. CUDA version, CPU only option)

docs/source/conf.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
import jaxtyping
2323
import sphinx_rtd_theme # noqa
24-
from uncompyle6.semantics.fragments import code_deparse
2524

2625

2726
sys.path.append(os.path.abspath(os.path.join(__file__, "..", "..", "..")))
@@ -63,6 +62,15 @@
6362
"tasklist", # Check boxes
6463
]
6564

65+
suppress_warnings = [
66+
# We use subsections of README in docs, which start with a lower header level
67+
# than H1, which makes myst_parser complain. This suppresses these warnings.
68+
"myst.header",
69+
# The config includes the _process function below, which is "unpickable".
70+
# This suppresses warnings about caching such values.
71+
"config.cache",
72+
]
73+
6674
# Add any paths that contain templates here, relative to this directory.
6775
templates_path = ["_templates"]
6876

@@ -87,7 +95,7 @@
8795
# Example configuration for intersphinx: refer to the Python standard library.
8896
intersphinx_mapping = {
8997
"python": ("https://docs.python.org/3/", None),
90-
"torch": ("https://pytorch.org/docs/master/", None),
98+
"torch": ("https://pytorch.org/docs/main/", None),
9199
}
92100

93101
# Disable documentation inheritance so as to avoid inheriting
@@ -117,15 +125,15 @@ def _convert_internal_and_external_class_to_strings(annotation):
117125

118126
# Convert jaxtyping dimensions into strings
119127
def _dim_to_str(dim):
120-
if isinstance(dim, jaxtyping.array_types._NamedVariadicDim):
128+
if isinstance(dim, jaxtyping._array_types._NamedVariadicDim):
121129
return "..."
122-
elif isinstance(dim, jaxtyping.array_types._FixedDim):
130+
elif isinstance(dim, jaxtyping._array_types._FixedDim):
123131
res = str(dim.size)
124132
if dim.broadcastable:
125133
res = "#" + res
126134
return res
127-
elif isinstance(dim, jaxtyping.array_types._SymbolicDim):
128-
expr = code_deparse(dim.expr).text.strip().split("return ")[1]
135+
elif isinstance(dim, jaxtyping._array_types._SymbolicDim):
136+
expr = dim.elem
129137
return f"({expr})"
130138
elif "jaxtyping" not in str(dim.__class__): # Probably the case that we have an ellipsis
131139
return "..."
@@ -220,4 +228,4 @@ def _process(annotation, config):
220228
# @jpchen's hack to get rtd builder to install latest pytorch
221229
# See similar line in the install section of .travis.yml
222230
if "READTHEDOCS" in os.environ:
223-
os.system("pip install torch==1.11.0+cpu -f https://download.pytorch.org/whl/torch_stable.html")
231+
os.system("pip install torch==2.0+cpu -f https://download.pytorch.org/whl/torch_stable.html")

setup.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from setuptools import find_packages, setup
99

1010
REQUIRED_MAJOR = 3
11-
REQUIRED_MINOR = 8
11+
REQUIRED_MINOR = 10
1212

1313
# Check for python version
1414
if sys.version_info < (REQUIRED_MAJOR, REQUIRED_MINOR):
@@ -24,7 +24,7 @@
2424

2525
readme = open("README.md").read()
2626

27-
torch_min = "1.11"
27+
torch_min = "2.0"
2828
install_requires = [">=".join(["torch", torch_min])]
2929

3030
# if recent dev version of PyTorch is installed, no need to install stable
@@ -77,7 +77,7 @@ def find_version(*file_paths):
7777
"Programming Language :: Python :: 3",
7878
],
7979
packages=find_packages(exclude=["test", "test.*"]),
80-
python_requires=">=3.8",
80+
python_requires=f">={REQUIRED_MAJOR}.{REQUIRED_MINOR}",
8181
install_requires=install_requires,
8282
extras_require={
8383
"dev": ["pre-commit", "setuptools_scm", "ufmt", "twine"],
@@ -88,7 +88,6 @@ def find_version(*file_paths):
8888
"six",
8989
"sphinx_rtd_theme",
9090
"sphinx-autodoc-typehints",
91-
"uncompyle6<=3.9.0",
9291
],
9392
"test": [
9493
"flake8==5.0.4",

0 commit comments

Comments
 (0)