Skip to content

Commit 2ad8d81

Browse files
Balandatfacebook-github-bot
authored andcommitted
Update call sites for LazyTensor -> LinearOperator (#1363)
Summary: Pull Request resolved: #1363 Fixes issues caused by the LazyTensor -> LinearOperator move in cornellius-gp/gpytorch#2027 Reviewed By: saitcakmak Differential Revision: D38296334 fbshipit-source-id: b9c0748009a926a3a9e859011d80c942410aa6b4
1 parent 8b98152 commit 2ad8d81

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+357
-308
lines changed

.conda/meta.yaml

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

1414
requirements:
1515
host:
16-
- python>=3.7
16+
- python>=3.8
1717
- setuptools
1818
- setuptools_scm
1919
run:
20-
- pytorch >=1.10
21-
- gpytorch ==1.8.1
20+
- pytorch >=1.11
21+
- gpytorch >1.8.1
2222
- scipy
23-
- pyro-ppl >=1.8.0
23+
- pyro-ppl >=1.8.1
2424

2525
test:
2626
imports:

.github/workflows/deploy_on_release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
18-
python-version: [3.7, 3.9]
18+
python-version: ["3.8", "3.9"]
1919
steps:
2020
- uses: actions/checkout@v2
2121
- name: Set up Python ${{ matrix.python-version }}
@@ -29,7 +29,7 @@ jobs:
2929
run: |
3030
pytest -ra --cov=. --cov-report term-missing
3131
- name: Upload coverage
32-
if: ${{ runner.os == 'Linux' && matrix.python-version == 3.7 }}
32+
if: ${{ runner.os == 'Linux' && matrix.python-version == 3.8 }}
3333
run: |
3434
bash <(curl -s https://codecov.io/bash)
3535
@@ -46,7 +46,7 @@ jobs:
4646
- name: Set up Python
4747
uses: actions/setup-python@v2
4848
with:
49-
python-version: 3.7
49+
python-version: "3.8"
5050
- name: Install dependencies
5151
run: |
5252
pip install .[test]
@@ -76,7 +76,7 @@ jobs:
7676
with:
7777
miniconda-version: "latest"
7878
activate-environment: test
79-
python-version: "3.7"
79+
python-version: "3.8"
8080
- name: Fetch all history for all tags and branches
8181
run: git fetch --prune --unshallow
8282
- name: Install dependencies
@@ -86,7 +86,7 @@ jobs:
8686
conda install -y -c pytorch pytorch cpuonly
8787
conda install -y scipy sphinx pytest flake8
8888
conda install -y -c gpytorch gpytorch
89-
conda install -y -c conda-forge pyro-ppl>=1.8.0
89+
conda install -y -c conda-forge pyro-ppl>=1.8.1
9090
conda config --set anaconda_upload no
9191
- name: Build and verify conda package
9292
shell: bash -l {0}
@@ -111,7 +111,7 @@ jobs:
111111
- name: Set up Python
112112
uses: actions/setup-python@v2
113113
with:
114-
python-version: 3.7
114+
python-version: 3.8
115115
- name: Install dependencies
116116
# there may not be a compatible Ax pip version, so we use the development version
117117
run: |

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
- name: Set up Python
2121
uses: actions/setup-python@v2
2222
with:
23-
python-version: 3.7
23+
python-version: 3.8
2424
- name: Install dependencies
2525
run: |
26-
pip install "gpytorch==1.8.1"
26+
pip install git+https://github.com/cornellius-gp/gpytorch.git
2727
pip install .[dev]
2828
# NOTE: nbconvert 6.4.4 is incompatible with jinja2 3.1.0.
2929
# We can unpin this with a future release of nbconvert.

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Set up Python
2121
uses: actions/setup-python@v2
2222
with:
23-
python-version: 3.7
23+
python-version: 3.8
2424
- name: Install dependencies
2525
run: |
2626
# pin dependencies to match Meta-internal versions
@@ -40,7 +40,7 @@ jobs:
4040
- name: Set up Python
4141
uses: actions/setup-python@v2
4242
with:
43-
python-version: 3.7
43+
python-version: 3.8
4444
- name: Install dependencies
4545
run: |
4646
pip install flake8 flake8-docstrings

.github/workflows/nightly.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
18-
python-version: [3.7, 3.9]
18+
python-version: ["3.8", "3.9"]
1919
steps:
2020
- uses: actions/checkout@v2
2121
- name: Set up Python ${{ matrix.python-version }}
@@ -25,13 +25,13 @@ jobs:
2525
- name: Install dependencies
2626
run: |
2727
pip install --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
28-
pip install "gpytorch==1.8.1"
28+
pip install git+https://github.com/cornellius-gp/gpytorch.git
2929
pip install .[test]
3030
- name: Unit tests and coverage
3131
run: |
3232
pytest -ra --cov=. --cov-report term-missing
3333
- name: Upload coverage
34-
if: ${{ runner.os == 'Linux' && matrix.python-version == 3.7 }}
34+
if: ${{ runner.os == 'Linux' && matrix.python-version == 3.8 }}
3535
run: |
3636
bash <(curl -s https://codecov.io/bash)
3737
@@ -47,11 +47,11 @@ jobs:
4747
- name: Set up Python
4848
uses: actions/setup-python@v2
4949
with:
50-
python-version: 3.7
50+
python-version: 3.8
5151
- name: Install dependencies
5252
run: |
5353
pip install --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
54-
pip install "gpytorch==1.8.1"
54+
pip install git+https://github.com/cornellius-gp/gpytorch.git
5555
pip install .[test]
5656
pip install --upgrade build setuptools setuptools_scm wheel
5757
- name: Extract reduced version and save to env var
@@ -86,7 +86,7 @@ jobs:
8686
with:
8787
miniconda-version: "latest"
8888
activate-environment: test
89-
python-version: "3.7"
89+
python-version: "3.8"
9090
- name: Fetch all history for all tags and branches
9191
run: git fetch --prune --unshallow
9292
- name: Install dependencies
@@ -98,7 +98,7 @@ jobs:
9898
conda config --set anaconda_upload no
9999
conda install -y -c pytorch-nightly pytorch cpuonly
100100
conda install -y -c conda-forge pyro-ppl>=1.8.0
101-
pip install "gpytorch==1.8.1"
101+
pip install git+https://github.com/cornellius-gp/gpytorch.git
102102
- name: Build and verify conda package
103103
shell: bash -l {0}
104104
run: |
@@ -115,12 +115,12 @@ jobs:
115115
- name: Set up Python
116116
uses: actions/setup-python@v2
117117
with:
118-
python-version: 3.7
118+
python-version: 3.8
119119
- name: Fetch all history for all tags and branches
120120
run: git fetch --prune --unshallow
121121
- name: Install dependencies
122122
run: |
123-
pip install "gpytorch==1.8.1"
123+
pip install git+https://github.com/cornellius-gp/gpytorch.git
124124
pip install .[dev]
125125
pip install git+https://github.com/facebook/Ax.git
126126
# NOTE: nbconvert 6.4.4 is incompatible with jinja2 3.1.0.

.github/workflows/reusable_tutorials.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ jobs:
2525
- name: Set up Python
2626
uses: actions/setup-python@v2
2727
with:
28-
python-version: 3.7
28+
python-version: 3.8
2929
- name: Fetch all history for all tags and branches
3030
# We need to do this so setuptools_scm knows how to set the BoTorch version.
3131
run: git fetch --prune --unshallow
3232
- if: ${{ !inputs.use_stable_pytorch_gpytorch }}
3333
name: Install latest PyTorch & GPyTorch
3434
run: |
3535
pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
36-
pip install "gpytorch==1.8.1"
36+
pip install git+https://github.com/cornellius-gp/gpytorch.git
3737
- if: ${{ inputs.use_stable_pytorch_gpytorch }}
3838
name: Install min required PyTorch & GPyTorch
3939
run: |

.github/workflows/test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
20-
python-version: [3.7, 3.9]
20+
python-version: ["3.8", "3.9"]
2121
steps:
2222
- uses: actions/checkout@v2
2323
- name: Set up Python ${{ matrix.python-version }}
@@ -27,13 +27,13 @@ jobs:
2727
- name: Install dependencies
2828
run: |
2929
pip install --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
30-
pip install "gpytorch==1.8.1"
30+
pip install git+https://github.com/cornellius-gp/gpytorch.git
3131
pip install .[test]
3232
- name: Unit tests and coverage
3333
run: |
3434
pytest -ra --cov=. --cov-report term-missing
3535
- name: Upload coverage
36-
if: ${{ runner.os == 'Linux' && matrix.python-version == 3.7 }}
36+
if: ${{ runner.os == 'Linux' && matrix.python-version == 3.8 }}
3737
run: |
3838
bash <(curl -s https://codecov.io/bash)
3939
@@ -44,7 +44,7 @@ jobs:
4444
fail-fast: false
4545
matrix:
4646
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
47-
python-version: ["3.7", "3.9"]
47+
python-version: ["3.8", "3.9"]
4848
steps:
4949
- uses: actions/checkout@v2
5050
- uses: conda-incubator/setup-miniconda@v2
@@ -57,7 +57,7 @@ jobs:
5757
run: |
5858
conda install -y -c pytorch-nightly pytorch cpuonly
5959
conda install -y pip scipy sphinx pytest flake8
60-
pip install "gpytorch==1.8.1"
60+
pip install git+https://github.com/cornellius-gp/gpytorch.git
6161
pip install .[test]
6262
- name: Unit tests
6363
shell: bash -l {0}

.github/workflows/test_stable.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
15-
python-version: [3.7, 3.9]
15+
python-version: ["3.8", "3.9"]
1616
steps:
1717
- uses: actions/checkout@v2
1818
- name: Set up Python ${{ matrix.python-version }}
@@ -34,7 +34,7 @@ jobs:
3434
fail-fast: false
3535
matrix:
3636
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
37-
python-version: ["3.7", "3.9"]
37+
python-version: ["3.8", "3.9"]
3838
steps:
3939
- uses: actions/checkout@v2
4040
- uses: conda-incubator/setup-miniconda@v2
@@ -62,7 +62,7 @@ jobs:
6262
fail-fast: false
6363
matrix:
6464
os: ["ubuntu-latest", "macos-latest"]
65-
python-version: [3.7, 3.9]
65+
python-version: ["3.8", "3.9"]
6666
steps:
6767
- uses: actions/checkout@v2
6868
- name: Set up Python ${{ matrix.python-version }}

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ Optimization simply use Ax.
5555
## Installation
5656

5757
**Installation Requirements**
58-
- Python >= 3.7
59-
- PyTorch >= 1.10
60-
- gpytorch == 1.8.1
61-
- pyro-ppl >= 1.8.0
58+
- Python >= 3.8
59+
- PyTorch >= 1.11
60+
- gpytorch > 1.8.1
61+
- pyro-ppl >= 1.8.1
6262
- scipy
6363
- multiple-dispatch
6464

botorch/acquisition/active_learning.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ def forward(self, X: Tensor) -> Tensor:
100100
bdims = tuple(1 for _ in X.shape[:-2])
101101
if self.model.num_outputs > 1:
102102
# We use q=1 here b/c ScalarizedObjective currently does not fully exploit
103-
# lazy tensor operations and thus may be slow / overly memory-hungry.
104-
# TODO (T52818288): Properly use lazy tensors in scalarize_posterior
103+
# LinearOperator operations and thus may be slow / overly memory-hungry.
104+
# TODO (T52818288): Properly use LinearOperators in scalarize_posterior
105105
mc_points = self.mc_points.view(-1, *bdims, 1, X.size(-1))
106106
else:
107107
# While we only need marginal variances, we can evaluate for q>1

0 commit comments

Comments
 (0)