Skip to content

Commit

Permalink
use python >=3.7
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebookresearch#4324

X-link: fairinternal/detectron2#571

fix CircleCI Test Failure as fairscale requires 3.7+

Reviewed By: wat3rBro

Differential Revision: D37022594

fbshipit-source-id: 409ec7494008620c8621dc3f1fcae37e390cccdf
  • Loading branch information
lyttonhao authored and facebook-github-bot committed Jun 13, 2022
1 parent c9cf7c9 commit 5934a14
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ version_parameters: &version_parameters
default: "https://download.pytorch.org/whl/torch_stable.html"
python_version: # NOTE: only affect linux
type: string
default: '3.6.8'
default: '3.7.9'

environment:
PYTORCH_VERSION: << parameters.pytorch_version >>
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
if: ${{ github.repository_owner == 'facebookresearch' || github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.6
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.6
python-version: 3.7
- name: Install dependencies
# flake8-bugbear flake8-comprehensions are useful but not available internally
run: |
Expand Down
3 changes: 1 addition & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Installation

### Requirements
- Linux or macOS with Python ≥ 3.6
- Linux or macOS with Python ≥ 3.7
- PyTorch ≥ 1.8 and [torchvision](https://github.com/pytorch/vision/) that matches the PyTorch installation.
Install them together at [pytorch.org](https://pytorch.org) to make sure of this
- OpenCV is optional but needed by demo and visualization
Expand Down Expand Up @@ -259,4 +259,3 @@ See
which has step-by-step instructions.

* __Docker__: The official [Dockerfile](docker) installs detectron2 with a few simple commands.

2 changes: 1 addition & 1 deletion dev/packaging/build_all_wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ build_one() {
echo "Launching container $container_name ..."
container_id="$container_name"_"$cu"_"$pytorch_ver"

py_versions=(3.6 3.7 3.8 3.9)
py_versions=(3.7 3.8 3.9)

for py in "${py_versions[@]}"; do
docker run -itd \
Expand Down
4 changes: 2 additions & 2 deletions dev/packaging/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
echo "Build Settings:"
echo "CU_VERSION: $CU_VERSION" # e.g. cu101
echo "D2_VERSION_SUFFIX: $D2_VERSION_SUFFIX" # e.g. +cu101 or ""
echo "PYTHON_VERSION: $PYTHON_VERSION" # e.g. 3.6
echo "PYTHON_VERSION: $PYTHON_VERSION" # e.g. 3.7
echo "PYTORCH_VERSION: $PYTORCH_VERSION" # e.g. 1.4

setup_cuda
Expand All @@ -21,7 +21,7 @@ ln -sv /usr/bin/ninja-build /usr/bin/ninja || true

pip_install pip numpy -U
pip_install "torch==$PYTORCH_VERSION" \
-f https://download.pytorch.org/whl/"$CU_VERSION"/torch_stable.html
-f https://download.pytorch.org/whl/"$CU_VERSION"/torch_stable.html

# use separate directories to allow parallel build
BASE_BUILD_DIR=build/$CU_VERSION-py$PYTHON_VERSION-pt$PYTORCH_VERSION
Expand Down
1 change: 0 additions & 1 deletion dev/packaging/pkg_helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ setup_cuda() {

setup_wheel_python() {
case "$PYTHON_VERSION" in
3.6) python_abi=cp36-cp36m ;;
3.7) python_abi=cp37-cp37m ;;
3.8) python_abi=cp38-cp38 ;;
3.9) python_abi=cp39-cp39 ;;
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def resolve_any_xref(self, env, fromdocname, builder, target, node, contnode):
# skip this when building locally
intersphinx_timeout = 0.5
intersphinx_mapping = {
"python": ("https://docs.python.org/3.6", None),
"python": ("https://docs.python.org/3.7", None),
"numpy": ("https://docs.scipy.org/doc/numpy/", None),
"torch": ("https://pytorch.org/docs/master/", None),
}
Expand Down
2 changes: 1 addition & 1 deletion projects/DensePose/doc/GETTING_STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Please refer to [Apply Net](TOOL_APPLY_NET.md) for more details on this tool
DensePose can also be installed as a Python package for integration with other software.

The following dependencies are needed:
- Python >= 3.6
- Python >= 3.7
- [PyTorch](https://pytorch.org/get-started/locally/#start-locally) >= 1.7 (to match [detectron2 requirements](https://detectron2.readthedocs.io/en/latest/tutorials/install.html#requirements))
- [torchvision](https://pytorch.org/vision/stable/) version [compatible with your version of PyTorch](https://github.com/pytorch/vision#installation)

Expand Down
2 changes: 1 addition & 1 deletion projects/DensePose/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_detectron2_current_version():
version=get_detectron2_current_version(),
url="https://github.com/facebookresearch/detectron2/tree/main/projects/DensePose",
packages=find_packages(),
python_requires=">=3.6",
python_requires=">=3.7",
install_requires=[
"av>=8.0.3",
"detectron2@git+https://github.com/facebookresearch/detectron2.git",
Expand Down
2 changes: 1 addition & 1 deletion projects/TensorMask/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def get_extensions():
version="0.1",
author="FAIR",
packages=find_packages(exclude=("configs", "tests")),
python_requires=">=3.6",
python_requires=">=3.7",
ext_modules=get_extensions(),
cmdclass={"build_ext": torch.utils.cpp_extension.BuildExtension},
)
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sections=FUTURE,STDLIB,THIRDPARTY,myself,FIRSTPARTY,LOCALFOLDER
default_section=FIRSTPARTY

[mypy]
python_version=3.6
python_version=3.7
ignore_missing_imports = True
warn_unused_configs = True
disallow_untyped_defs = True
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def get_model_zoo_configs() -> List[str]:
packages=find_packages(exclude=("configs", "tests*")) + list(PROJECTS.keys()),
package_dir=PROJECTS,
package_data={"detectron2.model_zoo": get_model_zoo_configs()},
python_requires=">=3.6",
python_requires=">=3.7",
install_requires=[
# These dependencies are not pure-python.
# In general, avoid adding more dependencies like them because they are not
Expand Down

0 comments on commit 5934a14

Please sign in to comment.