Skip to content

Commit a919929

Browse files
Balandatfacebook-github-bot
authored andcommitted
Remove support for anaconda (official package) (#2617)
Summary: See #2613 for details. An anaconda package will still be a conda package available on the `c conda-forge`channel for those users who need it. Pull Request resolved: #2617 Reviewed By: saitcakmak, esantorella Differential Revision: D65603328 Pulled By: Balandat fbshipit-source-id: 973086a49b51daf07718060d64893c44e3483dee
1 parent 9ae465b commit a919929

File tree

15 files changed

+38
-297
lines changed

15 files changed

+38
-297
lines changed

.conda/build_conda.sh

Lines changed: 0 additions & 14 deletions
This file was deleted.

.conda/meta.yaml

Lines changed: 0 additions & 50 deletions
This file was deleted.

.github/workflows/deploy_on_release.yml

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ on:
88

99
jobs:
1010

11-
tests-and-coverage-pip:
11+
tests-and-coverage:
1212
name: Test & Coverage
13-
uses: ./.github/workflows/reusable_test_pip.yml
13+
uses: ./.github/workflows/reusable_test.yml
1414
with:
1515
use_latest_pytorch_gpytorch: false
1616
secrets: inherit
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121
permissions:
2222
id-token: write # This is required for PyPI OIDC authentication.
23-
needs: tests-and-coverage-pip
23+
needs: tests-and-coverage
2424
steps:
2525
- uses: actions/checkout@v4
2626
- name: Fetch all history for all tags and branches
@@ -44,43 +44,9 @@ jobs:
4444
with:
4545
verbose: true
4646

47-
package-deploy-conda:
48-
name: Package conda and deploy to anaconda.org
49-
runs-on: 8-core-ubuntu
50-
needs: tests-and-coverage-pip
51-
steps:
52-
- uses: actions/checkout@v4
53-
- uses: conda-incubator/setup-miniconda@v3
54-
with:
55-
miniconda-version: "latest"
56-
activate-environment: test
57-
python-version: "3.10"
58-
- name: Fetch all history for all tags and branches
59-
run: git fetch --prune --unshallow
60-
- name: Install dependencies
61-
shell: bash -l {0}
62-
run: |
63-
conda install -y setuptools_scm conda-build conda-verify anaconda-client
64-
conda install -y scipy sphinx pytest flake8 multipledispatch
65-
conda install -y -c pytorch pytorch cpuonly
66-
conda install -y -c gpytorch gpytorch
67-
conda install -y -c conda-forge pyro-ppl>=1.8.4
68-
conda config --set anaconda_upload no
69-
- name: Build and verify conda package
70-
shell: bash -l {0}
71-
run: |
72-
./scripts/build_and_verify_conda_package.sh
73-
- name: Deploy to anaconda.org
74-
shell: bash -l {0}
75-
run: |
76-
botorch_version=$(python -m setuptools_scm)
77-
build_dir="$(pwd)/.conda/conda_build/noarch"
78-
pkg_file="${build_dir}/botorch-${botorch_version}-0.tar.bz2"
79-
anaconda -t ${{ secrets.ANACONDA_UPLOAD_TOKEN }} upload -u pytorch $pkg_file
80-
8147
publish-versioned-website:
8248
name: Publish versioned website
83-
needs: [package-deploy-pypi, package-deploy-conda]
49+
needs: package-deploy-pypi
8450
uses: ./.github/workflows/reusable_website.yml
8551
with:
8652
publish_versioned_website: true

.github/workflows/nightly.yml

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
tests-and-coverage-nightly:
1212
name: Test & Coverage
13-
uses: ./.github/workflows/reusable_test_pip.yml
13+
uses: ./.github/workflows/reusable_test.yml
1414
with:
1515
use_latest_pytorch_gpytorch: true
1616
secrets: inherit
@@ -60,39 +60,9 @@ jobs:
6060
skip-existing: true
6161
verbose: true
6262

63-
package-conda:
64-
name: Test conda build
65-
runs-on: 8-core-ubuntu
66-
steps:
67-
- uses: actions/checkout@v4
68-
- uses: conda-incubator/setup-miniconda@v3
69-
with:
70-
miniconda-version: "latest"
71-
activate-environment: test
72-
python-version: "3.10"
73-
- name: Fetch all history for all tags and branches
74-
run: git fetch --prune --unshallow
75-
- name: Install dependencies
76-
shell: bash -l {0}
77-
env:
78-
ALLOW_LATEST_GPYTORCH_LINOP: true
79-
# Don't need most deps for conda build, but need them for testing
80-
# We do need setuptools_scm though to properly parse the version
81-
run: |
82-
conda install -y scipy multipledispatch setuptools_scm conda-build conda-verify
83-
conda config --set anaconda_upload no
84-
conda install -y -c pytorch-nightly pytorch cpuonly
85-
conda install -y -c conda-forge pyro-ppl>=1.8.4
86-
pip install git+https://github.com/cornellius-gp/linear_operator.git
87-
pip install git+https://github.com/cornellius-gp/gpytorch.git
88-
- name: Build and verify conda package
89-
shell: bash -l {0}
90-
run: |
91-
./scripts/build_and_verify_conda_package.sh
92-
9363
publish-latest-website:
9464
name: Publish latest website
95-
needs: [tests-and-coverage-nightly, package-test-deploy-pypi, package-conda]
65+
needs: [tests-and-coverage-nightly, package-test-deploy-pypi]
9666
uses: ./.github/workflows/reusable_website.yml
9767
with:
9868
publish_versioned_website: false

.github/workflows/reusable_test_pip.yml renamed to .github/workflows/reusable_test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Reusable Test Workflow w/ pip
1+
name: Reusable Test Workflow
22

33
on:
44
workflow_call:
@@ -13,8 +13,8 @@ on:
1313

1414

1515
jobs:
16-
tests-and-coverage-pip:
17-
name: Tests and coverage (pip, Python ${{ matrix.python-version }}, ${{ matrix.os }})
16+
tests-and-coverage:
17+
name: Tests and coverage (Python ${{ matrix.python-version }}, ${{ matrix.os }})
1818
runs-on: ${{ matrix.os }}
1919
strategy:
2020
fail-fast: false

.github/workflows/test.yml

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -9,43 +9,9 @@ on:
99

1010
jobs:
1111

12-
tests-and-coverage-pip:
13-
name: Test & Coverage (pip)
14-
uses: ./.github/workflows/reusable_test_pip.yml
12+
tests-and-coverage:
13+
name: Test & Coverage
14+
uses: ./.github/workflows/reusable_test.yml
1515
with:
1616
use_latest_pytorch_gpytorch: true
1717
secrets: inherit
18-
19-
tests-conda:
20-
name: Tests (conda, ${{ matrix.os }})
21-
runs-on: ${{ matrix.os }}
22-
strategy:
23-
fail-fast: false
24-
matrix:
25-
os: ["ubuntu-latest", "macos-14", "windows-latest"]
26-
python-version: ["3.10", "3.12"]
27-
steps:
28-
- uses: actions/checkout@v4
29-
- uses: conda-incubator/setup-miniconda@v3
30-
with:
31-
miniconda-version: "latest"
32-
activate-environment: test
33-
python-version: ${{ matrix.python-version }}
34-
- name: Install dependencies
35-
shell: bash -l {0}
36-
env:
37-
ALLOW_LATEST_GPYTORCH_LINOP: true
38-
run: |
39-
conda install pytorch torchvision -c pytorch
40-
conda install -y pip scipy sphinx pytest flake8
41-
pip install git+https://github.com/cornellius-gp/linear_operator.git
42-
pip install git+https://github.com/cornellius-gp/gpytorch.git
43-
pip install .[test]
44-
- name: Unit tests -- BoTorch
45-
shell: bash -l {0}
46-
run: |
47-
pytest -ra test/
48-
- name: Unit tests -- BoTorch Community
49-
shell: bash -l {0}
50-
run: |
51-
pytest -ra test_community/

.github/workflows/test_stable.yml

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -5,48 +5,16 @@ on:
55

66
jobs:
77

8-
tests-and-coverage-pip-stable:
8+
tests-and-coverage-stable:
99
name: Test & Coverage
10-
uses: ./.github/workflows/reusable_test_pip.yml
10+
uses: ./.github/workflows/reusable_test.yml
1111
with:
1212
use_latest_pytorch_gpytorch: false
1313
upload_coverage: false
1414
secrets: inherit
1515

16-
tests-conda-stable:
17-
name: Tests (conda, ${{ matrix.os }})
18-
runs-on: ${{ matrix.os }}
19-
strategy:
20-
fail-fast: false
21-
matrix:
22-
os: ["ubuntu-latest", "macos-14", "windows-latest"]
23-
python-version: ["3.10", "3.12"]
24-
steps:
25-
- uses: actions/checkout@v4
26-
- uses: conda-incubator/setup-miniconda@v3
27-
with:
28-
miniconda-version: "latest"
29-
activate-environment: test
30-
python-version: ${{ matrix.python-version }}
31-
- name: Install dependencies
32-
shell: bash -l {0}
33-
run: |
34-
conda install -y -c pytorch pytorch cpuonly
35-
conda install -y pip scipy pytest
36-
conda install -y -c gpytorch gpytorch
37-
conda install -y -c conda-forge pyro-ppl>=1.8.4
38-
pip install .[test]
39-
- name: Unit tests and coverage -- BoTorch
40-
shell: bash -l {0}
41-
run: |
42-
pytest -ra test/ --cov botorch/ --cov-report term-missing --cov-report xml:botorch_cov.xml
43-
- name: Unit tests and coverage -- BoTorch Community
44-
shell: bash -l {0}
45-
run: |
46-
pytest -ra test_community/ --cov botorch_community/ --cov-report term-missing --cov-report xml:botorch_community_cov.xml
47-
48-
tests-and-coverage-min-req-pip:
49-
name: Tests and coverage min req. torch, gpytorch & linear_operator versions (pip, Python ${{ matrix.python-version }}, ${{ matrix.os }})
16+
tests-and-coverage-min-req:
17+
name: Tests and coverage min req. torch, gpytorch & linear_operator versions (Python ${{ matrix.python-version }}, ${{ matrix.os }})
5018
runs-on: ${{ matrix.os }}
5119
strategy:
5220
fail-fast: false

README.md

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
[![Nightly](https://github.com/pytorch/botorch/actions/workflows/nightly.yml/badge.svg)](https://github.com/pytorch/botorch/actions?query=workflow%3ANightly)
1212
[![Codecov](https://img.shields.io/codecov/c/github/pytorch/botorch.svg)](https://codecov.io/github/pytorch/botorch)
1313

14-
[![Conda](https://img.shields.io/conda/v/pytorch/botorch.svg)](https://anaconda.org/pytorch/botorch)
1514
[![PyPI](https://img.shields.io/pypi/v/botorch.svg)](https://pypi.org/project/botorch)
1615
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
1716

@@ -63,39 +62,26 @@ Optimization simply use Ax.
6362
- scipy
6463
- multiple-dispatch
6564

66-
### Prerequisite only for MacOS users with Intel processors:
67-
Before installing BoTorch, we recommend first manually installing PyTorch, a required dependency of
68-
BoTorch. Installing it according to the [PyTorch installation instructions](https://pytorch.org/get-started/locally/)
69-
ensures that it is properly linked against MKL, a library that optimizes mathematical computation for Intel processors.
70-
This will result in up to an order-of-magnitude speed-up for Bayesian optimization, as at the moment,
71-
installing PyTorch from pip does not link against MKL.
72-
73-
The PyTorch installation instructions currently recommend:
74-
1. Install [Anaconda](https://www.anaconda.com/distribution/#download-section). Note that there are different installers for Intel and M1 Macs.
75-
2. Install PyTorch following the [PyTorch installation instructions](https://pytorch.org/get-started/locally/).
76-
Currently, this suggests running `conda install pytorch torchvision -c pytorch`.
77-
78-
If you want to customize your installation, please follow the [PyTorch installation instructions](https://pytorch.org/get-started/locally/) to build from source.
7965

8066
### Option 1: Installing the latest release
8167

82-
The latest release of BoTorch is easily installed either via
83-
[Anaconda](https://www.anaconda.com/distribution/#download-section) (recommended) or pip.
68+
The latest release of BoTorch is easily installed via `pip`:
8469

85-
**To install BoTorch from Anaconda**, run
8670
```bash
87-
conda install botorch -c pytorch -c gpytorch -c conda-forge
71+
pip install botorch
8872
```
89-
The above command installs BoTorch and any needed dependencies. ` -c pytorch -c gpytorch -c conda-forge` means that the most preferred source to install from is the PyTorch channel, the next most preferred is the GPyTorch channel,
90-
and the least preferred is conda-forge.
9173

92-
**Alternatively, to install with `pip`**, do
74+
_Note_: Make sure the `pip` being used is actually the one from the newly created
75+
Conda environment. If you're using a Unix-based OS, you can use `which pip` to check.
76+
77+
BoTorch [stopped publishing](https://github.com/pytorch/botorch/discussions/2613#discussion-7431533)
78+
an official Anaconda package to the `pytorch` channel after the 0.12 release. However,
79+
users can still use the package published to the `conda-forge` channel and install botorch via
80+
9381
```bash
94-
pip install botorch
82+
conda install botorch -c gpytorch -c conda-forge
9583
```
9684

97-
_Note_: Make sure the `pip` being used is actually the one from the newly created Conda environment. If you're using a Unix-based OS, you can use `which pip` to check.
98-
9985
### Option 2: Installing from latest main branch
10086

10187
If you would like to try our bleeding edge features (and don't mind potentially

docs/getting_started.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ Before jumping the gun, we recommend you start with the high-level
1313

1414
#### Installation Requirements:
1515

16-
BoTorch is easily installed via
17-
[Anaconda](https://www.anaconda.com/distribution/#download-section) (strongly recommended for OSX)
18-
or `pip`:
16+
BoTorch is easily installed via `pip` (recommended). It is also possible to
17+
use the (unofficial) [Anaconda](https://www.anaconda.com/distribution/#download-section)
18+
package from the `-c conda-forge` channel.
1919

2020
<!--DOCUSAURUS_CODE_TABS-->
21-
<!--Conda-->
22-
```bash
23-
conda install botorch -c pytorch -c gpytorch -c conda-forge
24-
```
2521
<!--pip-->
2622
```bash
2723
pip install botorch
2824
```
25+
<!--Conda-->
26+
```bash
27+
conda install botorch -c gpytorch -c conda-forge
28+
```
2929
<!--END_DOCUSAURUS_CODE_TABS-->
3030

3131
For more installation options and detailed instructions, please see the

environment.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)