Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
69ab85f
.
johnnynunez Jan 11, 2023
58dca3d
update
johnnynunez Jan 11, 2023
1b69fbe
Fixed
johnnynunez Jan 11, 2023
b7a90a0
workflow.yml
johnnynunez Jan 11, 2023
84a6647
cu118 cu120 and future pytorch 2.0
johnnynunez Jan 13, 2023
a2e4ef4
come back to 3.9 CircleCi
johnnynunez Jan 13, 2023
9eb1fdb
come back to 3.9 CircleCi
johnnynunez Jan 13, 2023
36beebc
come back to 3.9 CircleCi
johnnynunez Jan 13, 2023
ea04a2b
come back to 3.9 CircleCi
johnnynunez Jan 13, 2023
f90fd1e
come back to 3.9 CircleCi
johnnynunez Jan 13, 2023
1c9d5da
updated linter
johnnynunez Jan 13, 2023
3cdf9d1
Merge branch 'main' into main
wat3rBro Feb 1, 2023
4b25570
Merge branch 'main' into main
johnnynunez Feb 13, 2023
043580f
linux version
johnnynunez Feb 13, 2023
bc4785a
CI
johnnynunez Feb 13, 2023
437d969
Update python version 3.10
johnnynunez Feb 13, 2023
e0ac030
fix typo
johnnynunez Feb 13, 2023
871c0d6
fix typo
johnnynunez Feb 13, 2023
bbd61c7
ubuntu 20.04 gpu
johnnynunez Feb 13, 2023
d7dbed1
ubuntu 20.04 gpu
johnnynunez Feb 13, 2023
ffd2eaf
ubuntu 20.04 gpu
johnnynunez Feb 13, 2023
e4c77d2
delete python <3.9
johnnynunez Feb 13, 2023
0beb747
delete python <3.9
johnnynunez Feb 13, 2023
39a943d
cuda parameter
johnnynunez Feb 13, 2023
729a8b3
cuda parameter
johnnynunez Feb 13, 2023
05aaeea
cuda parameter
johnnynunez Feb 13, 2023
eb76760
cuda parameter
johnnynunez Feb 13, 2023
dc97edb
cuda parameter
johnnynunez Feb 13, 2023
4cef17f
cuda parameter
johnnynunez Feb 13, 2023
293a12e
cuda parameter
johnnynunez Feb 13, 2023
5e0a091
cuda parameter
johnnynunez Feb 13, 2023
0de64d8
initialized drivers
johnnynunez Feb 13, 2023
a86e669
initialized drivers
johnnynunez Feb 13, 2023
ae7f90f
initialized drivers
johnnynunez Feb 13, 2023
f7d0d7f
initialized drivers
johnnynunez Feb 13, 2023
46c6ed6
initialized drivers
johnnynunez Feb 13, 2023
c98e27b
Merge branch 'main' into main
johnnynunez Feb 15, 2023
5c572e8
Update config.yml
johnnynunez Feb 15, 2023
cb573f7
Update config.yml
johnnynunez Feb 15, 2023
273f7ef
Update config.yml
johnnynunez Feb 15, 2023
8d8e4b2
Update config.yml
johnnynunez Feb 15, 2023
ad472ff
Update config.yml
johnnynunez Feb 15, 2023
b5f6f5e
Merge branch 'main' into main
johnnynunez Feb 18, 2023
59b876c
New circle-ci
johnnynunez Mar 2, 2023
311cb4b
Merge branch 'main' into main
johnnynunez Mar 2, 2023
5794838
CUDA VERSION
johnnynunez Mar 2, 2023
bbaf60a
Merge remote-tracking branch 'origin/main'
johnnynunez Mar 2, 2023
9260890
CUDA VERSION
johnnynunez Mar 2, 2023
65ac489
CircleCI images cuda11.6 and cuda11.8.
johnnynunez Mar 2, 2023
11dc5ab
CircleCI images cuda11.6 and cuda11.8.
johnnynunez Mar 2, 2023
aa0f06d
ubuntu 22.04
johnnynunez Mar 2, 2023
7653270
windows updated
johnnynunez Mar 2, 2023
94875d4
windows updated
johnnynunez Mar 2, 2023
1e1369b
windows updated
johnnynunez Mar 2, 2023
5c3fb8c
updated
johnnynunez Mar 2, 2023
4a5ada5
updated test
johnnynunez Mar 2, 2023
601d754
updated test
johnnynunez Mar 2, 2023
ce73df9
updated test
johnnynunez Mar 2, 2023
23ac4cf
updated test
johnnynunez Mar 3, 2023
2947b31
updated test
johnnynunez Mar 3, 2023
5a5031d
updated test
johnnynunez Mar 3, 2023
61fd032
unified circleCI and Github workflow versions
johnnynunez Mar 3, 2023
fed7c81
unified circleCI and Github workflow versions
johnnynunez Mar 3, 2023
bed6335
Merge branch 'main' into main
johnnynunez Mar 4, 2023
8830dff
Merge branch 'main' into main
johnnynunez Mar 6, 2023
7f580b9
Update config.yml
johnnynunez Mar 6, 2023
1a6a0f9
Update gen_install_table.py
johnnynunez Mar 6, 2023
af6c7f9
Update build_all_wheels.sh
johnnynunez Mar 6, 2023
05640db
Update gen_install_table.py
johnnynunez Mar 6, 2023
9039e04
Update gen_wheel_index.sh
johnnynunez Mar 6, 2023
1f69ae0
Update pkg_helpers.bash
johnnynunez Mar 6, 2023
576debf
Update config.yml
johnnynunez Mar 6, 2023
b52fd00
python 3.8
johnnynunez Mar 6, 2023
a5025f3
python 3.8
johnnynunez Mar 6, 2023
bbb279e
fix workflow
johnnynunez Mar 6, 2023
58a8697
fix workflow
johnnynunez Mar 6, 2023
51bde79
fix isort
johnnynunez Mar 6, 2023
c44e979
Merge branch 'main' into main
johnnynunez Mar 7, 2023
b6bfe64
Fix new isort version
johnnynunez Mar 7, 2023
5bd8f91
Fix new isort version
johnnynunez Mar 7, 2023
642578f
Merge branch 'main' into main
johnnynunez Mar 13, 2023
fa98765
Merge branch 'main' into main
johnnynunez Mar 13, 2023
1b259a2
linter
johnnynunez Mar 13, 2023
d8d5f14
linter all repo
johnnynunez Mar 13, 2023
ff144df
linter all repo
johnnynunez Mar 13, 2023
405ef0d
linter all repo
johnnynunez Mar 13, 2023
55145ba
.
johnnynunez Mar 13, 2023
432c544
.
johnnynunez Mar 13, 2023
6ab8cc8
.
johnnynunez Mar 13, 2023
294d59e
.
johnnynunez Mar 13, 2023
97afe71
.
johnnynunez Mar 13, 2023
c970a09
.
johnnynunez Mar 13, 2023
87b1bf9
.
johnnynunez Mar 13, 2023
35be008
.
johnnynunez Mar 13, 2023
380ea13
.
johnnynunez Mar 13, 2023
ee55c28
revert if
johnnynunez Mar 13, 2023
ad91af6
PYTORCH 2.0
johnnynunez Mar 15, 2023
ee99801
PYTORCH 2.0
johnnynunez Mar 15, 2023
821bc54
PYTORCH 2.0
johnnynunez Mar 15, 2023
42f76dd
upgrade torchvision
johnnynunez Mar 15, 2023
ab6d4a2
Merge branch 'main' into main
johnnynunez Mar 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
130 changes: 89 additions & 41 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@ version: 2.1
# -------------------------------------------------------------------------------------
cpu: &cpu
machine:
image: ubuntu-2004:202107-02
image: ubuntu-2204:2023.02.1
resource_class: medium

gpu: &gpu
machine:
# NOTE: use a cuda version that's supported by all our pytorch versions
image: ubuntu-1604-cuda-11.1:202012-01
image: linux-cuda-11:2023.02.1
resource_class: gpu.nvidia.small

windows-cpu: &windows_cpu
machine:
resource_class: windows.medium
image: windows-server-2019-vs2019:stable
image: windows-server-2022-gui:2022.10.1
shell: powershell.exe

# windows-gpu: &windows_gpu
# machine:
# resource_class: windows.gpu.nvidia.medium
# image: windows-server-2019-nvidia:stable
# resource_class: windows.gpu.nvidia.medium

version_parameters: &version_parameters
parameters:
Expand All @@ -36,15 +36,19 @@ version_parameters: &version_parameters
# use test wheels index to have access to RC wheels
# https://download.pytorch.org/whl/test/torch_test.html
default: "https://download.pytorch.org/whl/torch_stable.html"
python_version: # NOTE: only affect linux
python_version: # NOTE: only affects linux
type: string
default: '3.7.9'
default: '3.10.6'
cuda_version:
type: string
default: '11.6'

environment:
PYTORCH_VERSION: << parameters.pytorch_version >>
TORCHVISION_VERSION: << parameters.torchvision_version >>
PYTORCH_INDEX: << parameters.pytorch_index >>
PYTHON_VERSION: << parameters.python_version>>
CUDA_VERSION: << parameters.cuda_version >>
# point datasets to ~/.torch so it's cached in CI
DETECTRON2_DATASETS: ~/.torch/datasets

Expand All @@ -71,8 +75,8 @@ install_python: &install_python
name: Install Python
working_directory: ~/
command: |
# upgrade pyenv
cd /opt/circleci/.pyenv/plugins/python-build/../.. && git pull && cd -
cd /opt/circleci/.pyenv/plugins/python-build/../.. && git pull && cd
pyenv install -l
pyenv install -s $PYTHON_VERSION
pyenv global $PYTHON_VERSION
python --version
Expand Down Expand Up @@ -115,15 +119,29 @@ install_linux_dep: &install_linux_dep
# Don't use pytest-xdist: cuda tests are unstable under multi-process workers.
# Don't use opencv 4.7.0.68: https://github.com/opencv/opencv-python/issues/765
pip install --progress-bar off ninja opencv-python-headless!=4.7.0.68 pytest tensorboard pycocotools onnx
pip install --progress-bar off torch==$PYTORCH_VERSION -f $PYTORCH_INDEX
if [[ "$TORCHVISION_VERSION" == "master" ]]; then
pip install git+https://github.com/pytorch/vision.git
if [[ "$PYTORCH_VERSION" == "master" ]]; then
echo "Installing torch/torchvision from $PYTORCH_INDEX"
# Remove first, in case it's in the CI cache
pip uninstall -y torch torchvision
pip install -v --progress-bar off --pre torch torchvision --extra-index-url $PYTORCH_INDEX
pip install -v --progress-bar off omegaconf==2.1.2 # needed by FCOSE2ETest::test_empty_data
else
pip install --progress-bar off torchvision==$TORCHVISION_VERSION -f $PYTORCH_INDEX
echo "Installing torch==$PYTORCH_VERSION and torchvision==$TORCHVISION_VERSION from $PYTORCH_INDEX"
pip install -v --progress-bar off torch==$PYTORCH_VERSION torchvision==$TORCHVISION_VERSION -f $PYTORCH_INDEX
fi

python -c 'import torch; print("PyTorch Version:", torch.__version__)'
python -c 'import torchvision; print("TorchVision Version:", torchvision.__version__)'
python -c 'import torch; print("CUDA:", torch.cuda.is_available())'
echo "Python packages"
python -c "import sys; print(sys.executable)"
python --version
pip list
echo "GCC Compiler"
gcc --version
echo "OS Environment Variables"
env


install_detectron2: &install_detectron2
- run:
Expand Down Expand Up @@ -152,6 +170,12 @@ uninstall_tests: &uninstall_tests
# Tests that code is importable without installation
PYTHONPATH=. ./.circleci/import-tests.sh

select_cuda: &select_cuda
- run:
name: Select CUDA
command: |
sudo update-alternatives --set cuda /usr/local/cuda-<< parameters.cuda_version >>


# -------------------------------------------------------------------------------------
# Jobs to run
Expand All @@ -170,8 +194,7 @@ jobs:
# Refresh the key when dependencies should be updated (e.g. when pytorch releases)
- restore_cache:
keys:
- cache-{{ arch }}-<< parameters.pytorch_version >>-{{ .Branch }}-20210827

- cache-{{ arch }}-<< parameters.pytorch_version >>-{{ .Branch }}-20230317
- <<: *install_python
- <<: *install_linux_dep
- <<: *install_detectron2
Expand All @@ -182,8 +205,7 @@ jobs:
paths:
- /opt/circleci/.pyenv
- ~/.torch
key: cache-{{ arch }}-<< parameters.pytorch_version >>-{{ .Branch }}-20210827

key: cache-{{ arch }}-<< parameters.pytorch_version >>-{{ .Branch }}-20230317

linux_gpu_tests:
<<: *gpu
Expand All @@ -196,8 +218,8 @@ jobs:

- restore_cache:
keys:
- cache-{{ arch }}-<< parameters.pytorch_version >>-{{ .Branch }}-20210827

- cache-{{ arch }}-<< parameters.pytorch_version >>-{{ .Branch }}-20230317
- <<: *select_cuda
- <<: *install_python
- <<: *install_linux_dep
- <<: *install_detectron2
Expand All @@ -208,7 +230,8 @@ jobs:
paths:
- /opt/circleci/.pyenv
- ~/.torch
key: cache-{{ arch }}-<< parameters.pytorch_version >>-{{ .Branch }}-20210827
key: cache-{{ arch }}-<< parameters.pytorch_version >>-{{ .Branch }}-20230317


windows_cpu_build:
<<: *windows_cpu
Expand All @@ -221,7 +244,7 @@ jobs:
# Cache the env directory that contains dependencies
- restore_cache:
keys:
- cache-{{ arch }}-<< parameters.pytorch_version >>-{{ .Branch }}-20210404
- cache-{{ arch }}-<< parameters.pytorch_version >>-{{ .Branch }}-20230317

- run:
name: Install Dependencies
Expand All @@ -231,12 +254,28 @@ jobs:
pip install opencv-python-headless pytest-xdist pycocotools tensorboard onnx
pip install -U git+https://github.com/facebookresearch/iopath
pip install -U git+https://github.com/facebookresearch/fvcore
pip install torch==$env:PYTORCH_VERSION torchvision==$env:TORCHVISION_VERSION -f $env:PYTORCH_INDEX
if($env:PYTORCH_VERSION -eq "master"){
Write-Output "Installing torch/torchvision from $env:PYTORCH_INDEX"
pip uninstall -y torch torchvision
pip install --progress-bar off --pre torch torchvision --extra-index-url $env:PYTORCH_INDEX
}else{
Write-Output "Installing torch==$env:PYTORCH_VERSION and torchvision==$env:TORCHVISION_VERSION from $env:PYTORCH_INDEX"
pip install torch==$env:PYTORCH_VERSION torchvision==$env:TORCHVISION_VERSION -f $env:PYTORCH_INDEX
}
python -c 'import torch; print("PyTorch Version:", torch.__version__)'
python -c 'import torchvision; print("TorchVision Version:", torchvision.__version__)'
python -c 'import torch; print("CUDA:", torch.cuda.is_available())'
Write-Output "Python packages"
python -c "import sys; print(sys.executable)"
python --version
pip list
echo "OS Environment Variables"
dir env:

- save_cache:
paths:
- env
key: cache-{{ arch }}-<< parameters.pytorch_version >>-{{ .Branch }}-20210404
key: cache-{{ arch }}-<< parameters.pytorch_version >>-{{ .Branch }}-20230317

- <<: *install_detectron2
# TODO: unittest fails for now
Expand All @@ -246,26 +285,35 @@ workflows:
regular_test:
jobs:
- linux_cpu_tests:
name: linux_cpu_tests_pytorch1.10
pytorch_version: '1.10.0+cpu'
torchvision_version: '0.11.1+cpu'
- linux_gpu_tests:
name: linux_gpu_tests_pytorch1.8
pytorch_version: '1.8.1+cu111'
torchvision_version: '0.9.1+cu111'
name: linux_cpu_tests_pytorch1.12
pytorch_version: '1.12.1+cpu'
torchvision_version: '0.13.1+cpu'
- linux_cpu_tests:
name: linux_cpu_tests_pytorch1.13
pytorch_version: '1.13.1+cpu'
torchvision_version: '0.14.1+cpu'
- linux_cpu_tests:
name: linux_cpu_tests_pytorch2.0
pytorch_version: '2.0.0+cpu'
torchvision_version: '0.15.1+cpu'
- linux_gpu_tests:
name: linux_gpu_tests_pytorch1.9
pytorch_version: '1.9+cu111'
torchvision_version: '0.10+cu111'
name: linux_gpu_tests_pytorch1.12
pytorch_version: '1.12.1+cu116'
torchvision_version: '0.13.1+cu116'
cuda_version: '11.6'
- linux_gpu_tests:
name: linux_gpu_tests_pytorch1.10
pytorch_version: '1.10+cu111'
torchvision_version: '0.11.1+cu111'
name: linux_gpu_tests_pytorch1.13
pytorch_version: '1.13.1+cu116'
torchvision_version: '0.14.1+cu116'
cuda_version: '11.6'
- linux_gpu_tests:
name: linux_gpu_tests_pytorch1.10_python39
pytorch_version: '1.10+cu111'
torchvision_version: '0.11.1+cu111'
python_version: '3.9.6'
name: linux_gpu_tests_pytorch2.0
pytorch_version: '2.0.0+cu118'
torchvision_version: '0.15.1+cu118'
cuda_version: '11.8'
- windows_cpu_build:
pytorch_version: '1.12.1+cpu'
torchvision_version: '0.13.1+cpu'
- windows_cpu_build:
pytorch_version: '1.10+cpu'
torchvision_version: '0.11.1+cpu'
pytorch_version: '1.13.1+cpu'
torchvision_version: '0.14.1+cpu'
4 changes: 2 additions & 2 deletions .github/workflows/check-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
# comment this out when testing with https://github.com/nektos/act
if: ${{ github.repository_owner == 'facebookresearch' }}
steps:
- uses: actions/checkout@v2
- uses: actions/github-script@v3
- uses: actions/checkout@v3
- uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/needs-reply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
if: ${{ github.repository_owner == 'facebookresearch' }}
steps:
- name: Close old issues that need reply
uses: actions/github-script@v3
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
# Modified from https://github.com/dwieeb/needs-reply
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
if: ${{ github.repository_owner == 'facebookresearch' }}
steps:
- name: Lock closed issues that have no activity for a while
uses: dessant/lock-threads@v2
uses: dessant/lock-threads@v4
with:
github-token: ${{ github.token }}
issue-lock-inactive-days: '300'
Expand Down
44 changes: 21 additions & 23 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: CI
on: [push, pull_request]
on: [ push, pull_request ]

# Run linter with github actions for quick feedbacks.
# Run macos tests with github actions. Linux (CPU & GPU) tests currently runs on CircleCI
Expand All @@ -9,24 +9,24 @@ jobs:
# run on PRs, or commits to facebookresearch (not internal)
if: ${{ github.repository_owner == 'facebookresearch' || github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.10"
- name: Install dependencies
# flake8-bugbear flake8-comprehensions are useful but not available internally
run: |
python -m pip install --upgrade pip
python -m pip install flake8==3.8.1 isort==4.3.21
python -m pip install black==22.3.0
python -m pip install flake8==6.0.0 isort==5.12.0
python -m pip install black==23.1.0
flake8 --version
- name: Lint
run: |
echo "Running isort"
isort -c -sp .
isort -c --sp . .
echo "Running black"
black -l 100 --check .
black -l 100 .
echo "Running flake8"
flake8 .

Expand All @@ -37,31 +37,29 @@ jobs:
strategy:
fail-fast: false
matrix:
torch: ["1.8", "1.9", "1.10"]
torch: [ "1.12", "1.13" ]
include:
- torch: "1.8"
torchvision: 0.9
- torch: "1.9"
torchvision: "0.10"
- torch: "1.10"
torchvision: "0.11.1"
- torch: "1.12"
torchvision: "0.13.0"
- torch: "1.13"
torchvision: "0.14.0"
env:
# point datasets to ~/.torch so it's cached by CI
DETECTRON2_DATASETS: ~/.torch/datasets
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: "3.10"
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
${{ env.pythonLocation }}/lib/python3.8/site-packages
${{ env.pythonLocation }}/lib/python3.10/site-packages
~/.torch
key: ${{ runner.os }}-torch${{ matrix.torch }}-${{ hashFiles('setup.py') }}-20220119
key: ${{ runner.os }}-torch${{ matrix.torch }}-${{ hashFiles('setup.py') }}-20230313

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Installation

### Requirements
- Linux or macOS with Python ≥ 3.7
- Linux or macOS with Python ≥ 3.8
- 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
2 changes: 1 addition & 1 deletion configs/COCO-Detection/fcos_R_50_FPN_1x.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from ..common.optim import SGD as optimizer
from ..common.coco_schedule import lr_multiplier_1x as lr_multiplier
from ..common.data.coco import dataloader
from ..common.models.fcos import model
from ..common.optim import SGD as optimizer
from ..common.train import train

dataloader.train.mapper.use_instance_mask = False
Expand Down
2 changes: 1 addition & 1 deletion configs/COCO-Detection/retinanet_R_50_FPN_1x.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from ..common.optim import SGD as optimizer
from ..common.coco_schedule import lr_multiplier_1x as lr_multiplier
from ..common.data.coco import dataloader
from ..common.models.retinanet import model
from ..common.optim import SGD as optimizer
from ..common.train import train

dataloader.train.mapper.use_instance_mask = False
Expand Down
4 changes: 2 additions & 2 deletions configs/COCO-InstanceSegmentation/mask_rcnn_R_50_C4_1x.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from ..common.train import train
from ..common.optim import SGD as optimizer
from ..common.coco_schedule import lr_multiplier_1x as lr_multiplier
from ..common.data.coco import dataloader
from ..common.models.mask_rcnn_c4 import model
from ..common.optim import SGD as optimizer
from ..common.train import train

model.backbone.freeze_at = 2
train.init_checkpoint = "detectron2://ImageNetPretrained/MSRA/R-50.pkl"
Loading