Skip to content

Commit 4302a0c

Browse files
Balandatfacebook-github-bot
authored andcommitted
Require python 3.7 (#378)
Summary: Pull Request resolved: #378 This allows us to use - postponed evaluations of annotations (PEP 563) - dataclasses (PEP 557) Reviewed By: ldworkin Differential Revision: D20113101 fbshipit-source-id: 34e5ae22e9f590894a4c0ab200139380a297a248
1 parent 1913d1c commit 4302a0c

Some content is hidden

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

60 files changed

+137
-28
lines changed

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ commands:
9494

9595
jobs:
9696

97-
lint_test_py36_pip:
97+
lint_test_py38_pip:
9898
docker:
99-
- image: circleci/python:3.6.9
99+
- image: circleci/python:3.8.1
100100
steps:
101101
- checkout
102102
- pip_install:
@@ -124,7 +124,7 @@ jobs:
124124

125125
auto_deploy_site:
126126
docker:
127-
- image: circleci/python:3.6.9-node
127+
- image: circleci/python:3.8.1-node
128128
steps:
129129
- checkout
130130
- pip_install:
@@ -150,7 +150,7 @@ workflows:
150150

151151
lint_and_test:
152152
jobs:
153-
- lint_test_py36_pip:
153+
- lint_test_py38_pip:
154154
filters: *exclude_ghpages_fbconfig
155155
- lint_test_py37_conda:
156156
filters: *exclude_ghpages_fbconfig

.conda/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ build:
1313

1414
requirements:
1515
host:
16-
- python>=3.6
16+
- python>=3.7
1717
run:
1818
- pytorch>=1.4
1919
- gpytorch>=1.0.0

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Travis will fail on your PR if it does not adhere to the black formatting style.
3434

3535
#### Type Hints
3636

37-
BoTorch is fully typed using python 3.6+
37+
BoTorch is fully typed using python 3.7+
3838
[type hints](https://www.python.org/dev/peps/pep-0484/).
3939
We expect any contributions to also use proper type annotations. While we
4040
currently do not enforce full consistency of these in our continuous integration

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Optimization simply use Ax.
4949
## Installation
5050

5151
**Installation Requirements**
52-
- Python >= 3.6
52+
- Python >= 3.7
5353
- PyTorch >= 1.4
5454
- gpytorch >= 1.0
5555
- scipy

botorch/acquisition/acquisition.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
Abstract base module for all botorch acquisition functions.
99
"""
1010

11+
from __future__ import annotations
12+
1113
import warnings
1214
from abc import ABC, abstractmethod
1315
from typing import Optional

botorch/acquisition/active_learning.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
ArXiv 2017.
2222
"""
2323

24+
from __future__ import annotations
25+
2426
from typing import Optional
2527

2628
from botorch import settings

botorch/acquisition/analytic.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
Monte-Carlo sampling.
1010
"""
1111

12+
from __future__ import annotations
13+
1214
from abc import ABC
1315
from copy import deepcopy
1416
from typing import Dict, Optional, Tuple, Union

botorch/acquisition/cost_aware.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
To be used in a context where there is an objective/cost tradeoff.
1010
"""
1111

12+
from __future__ import annotations
13+
1214
import warnings
1315
from abc import ABC, abstractmethod
1416
from typing import Any, Callable, Optional

botorch/acquisition/fixed_feature.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
This is useful e.g. for performing contextual optimization.
1010
"""
1111

12+
from __future__ import annotations
13+
1214
from typing import List, Union
1315

1416
import torch

botorch/acquisition/knowledge_gradient.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
bayesian optimization. NIPS 2016.
2525
"""
2626

27+
from __future__ import annotations
28+
2729
from copy import deepcopy
2830
from typing import Callable, Optional, Tuple, Union
2931

0 commit comments

Comments
 (0)