Skip to content

Commit 80da3b9

Browse files
committed
Merge branch 'models/ssd' of https://github.com/datumbox/vision into models/ssd
2 parents b2e42bb + 6cfa98c commit 80da3b9

Some content is hidden

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

52 files changed

+2499
-747
lines changed

.circleci/config.yml

Lines changed: 183 additions & 172 deletions
Large diffs are not rendered by default.

.circleci/config.yml.in

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ jobs:
119119
command: |
120120
sudo apt-get update -y
121121
sudo apt install -y libturbojpeg-dev
122-
pip install --user --progress-bar off numpy mypy
122+
pip install --user --progress-bar off mypy
123123
pip install --user --progress-bar off --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
124124
pip install --user --progress-bar off --editable .
125125
mypy --config-file mypy.ini
@@ -153,7 +153,6 @@ jobs:
153153
- checkout
154154
- run:
155155
command: |
156-
pip install --user --progress-bar off numpy
157156
pip install --user --progress-bar off --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
158157
# need to install torchvision dependencies due to transitive imports
159158
pip install --user --progress-bar off --editable .
@@ -166,7 +165,6 @@ jobs:
166165
- checkout
167166
- run:
168167
command: |
169-
pip install --user --progress-bar off numpy
170168
pip install --user --progress-bar off --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
171169
# need to install torchvision dependencies due to transitive imports
172170
pip install --user --progress-bar off --editable .
@@ -216,6 +214,7 @@ jobs:
216214
- designate_upload_channel
217215
- run:
218216
name: Build conda packages
217+
no_output_timeout: 20m
219218
command: |
220219
set -ex
221220
source packaging/windows/internal/vc_install_helper.sh
@@ -513,12 +512,17 @@ jobs:
513512
name: Generate cache key
514513
# This will refresh cache on Sundays, nightly build should generate new cache.
515514
command: echo "$(date +"%Y-%U")" > .circleci-weekly
515+
- restore_cache:
516+
{% raw %}
517+
keys:
518+
- env-v3-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
519+
{% endraw %}
516520
- run:
517521
name: Setup
518522
command: docker run -e PYTHON_VERSION -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/setup_env.sh
519523
- save_cache:
520524
{% raw %}
521-
key: env-v2-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
525+
key: env-v3-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
522526
{% endraw %}
523527
paths:
524528
- conda
@@ -587,6 +591,11 @@ jobs:
587591
name: Generate cache key
588592
# This will refresh cache on Sundays, nightly build should generate new cache.
589593
command: echo "$(date +"%Y-%U")" > .circleci-weekly
594+
- restore_cache:
595+
{% raw %}
596+
keys:
597+
- env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
598+
{% endraw %}
590599
- run:
591600
name: Setup
592601
command: .circleci/unittest/windows/scripts/setup_env.sh

.circleci/regenerate.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,17 @@
2020

2121

2222
PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"]
23-
CUDA_VERSION = ["10.1", "10.2", "11.2"]
23+
24+
RC_PATTERN = r"/v[0-9]+(\.[0-9]+)*-rc[0-9]+/"
2425

2526

2627
def build_workflows(prefix='', filter_branch=None, upload=False, indentation=6, windows_latest_only=False):
2728
w = []
2829
for btype in ["wheel", "conda"]:
2930
for os_type in ["linux", "macos", "win"]:
3031
python_versions = PYTHON_VERSIONS
31-
cu_versions_dict = {"linux": ["cpu", "cu101", "cu102", "cu112"],
32-
"win": ["cpu", "cu101", "cu102", "cu112"],
32+
cu_versions_dict = {"linux": ["cpu", "cu101", "cu102", "cu111"],
33+
"win": ["cpu", "cu101", "cu102", "cu111"],
3334
"macos": ["cpu"]}
3435
cu_versions = cu_versions_dict[os_type]
3536
for python_version in python_versions:
@@ -91,7 +92,8 @@ def upload_doc_job(filter_branch):
9192
}
9293

9394
if filter_branch:
94-
job["filters"] = gen_filter_branch_tree(filter_branch)
95+
job["filters"] = gen_filter_branch_tree(filter_branch,
96+
tags_list=RC_PATTERN)
9597
return [{"upload_docs": job}]
9698

9799

@@ -100,6 +102,7 @@ def upload_doc_job(filter_branch):
100102
"cu101": "pytorch/manylinux-cuda101",
101103
"cu102": "pytorch/manylinux-cuda102",
102104
"cu110": "pytorch/manylinux-cuda110",
105+
"cu111": "pytorch/manylinux-cuda111",
103106
"cu112": "pytorch/manylinux-cuda112",
104107
}
105108

@@ -151,8 +154,11 @@ def generate_base_workflow(base_workflow_name, python_version, cu_version,
151154
return {w: d}
152155

153156

154-
def gen_filter_branch_tree(*branches):
155-
return {"branches": {"only": [b for b in branches]}}
157+
def gen_filter_branch_tree(*branches, tags_list=None):
158+
filter_dict = {"branches": {"only": [b for b in branches]}}
159+
if tags_list is not None:
160+
filter_dict["tags"] = {"only": tags_list}
161+
return filter_dict
156162

157163

158164
def generate_upload_workflow(base_workflow_name, os_type, btype, cu_version, *, filter_branch=None):

.circleci/smoke_test/docker/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ RUN conda create -y --name python3.7 python=3.7
3030
RUN conda create -y --name python3.8 python=3.8
3131
SHELL [ "/bin/bash", "-c" ]
3232
RUN echo "source /usr/local/etc/profile.d/conda.sh" >> ~/.bashrc
33-
RUN source /usr/local/etc/profile.d/conda.sh && conda activate python3.6 && conda install -y numpy Pillow
34-
RUN source /usr/local/etc/profile.d/conda.sh && conda activate python3.7 && conda install -y numpy Pillow
35-
RUN source /usr/local/etc/profile.d/conda.sh && conda activate python3.8 && conda install -y numpy Pillow
33+
RUN source /usr/local/etc/profile.d/conda.sh && conda activate python3.6 && conda install -y Pillow
34+
RUN source /usr/local/etc/profile.d/conda.sh && conda activate python3.7 && conda install -y Pillow
35+
RUN source /usr/local/etc/profile.d/conda.sh && conda activate python3.8 && conda install -y Pillow
3636
CMD [ "/bin/bash"]

.circleci/unittest/linux/scripts/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
channels:
22
- pytorch
33
- defaults
4-
# using conda-forge for python v3.9+
4+
# using conda-forge for python v3.9
55
- conda-forge
66
dependencies:
77
- pytest

.circleci/unittest/linux/scripts/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ else
2424
fi
2525

2626
printf "Installing PyTorch with %s\n" "${cudatoolkit}"
27-
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" -c conda-forge pytorch "${cudatoolkit}"
27+
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" -c conda-forge "pytorch-${UPLOAD_CHANNEL}"::pytorch "${cudatoolkit}"
2828

2929
printf "* Installing torchvision\n"
3030
python setup.py develop

.circleci/unittest/linux/scripts/setup_env.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,10 @@ conda activate "${env_dir}"
3636

3737
# 3. Install Conda dependencies
3838
printf "* Installing dependencies (except PyTorch)\n"
39-
NUMPY_MIN_VER="1.11"
4039
FFMPEG_PIN="=4.2"
4140
if [[ "${PYTHON_VERSION}" = "3.9" ]]; then
42-
NUMPY_MIN_VER="1.20"
4341
FFMPEG_PIN=">=4.2"
4442
fi
4543

46-
conda install -y -c conda-forge "numpy >=${NUMPY_MIN_VER}"
4744
conda install -y -c pytorch "ffmpeg${FFMPEG_PIN}"
4845
conda env update --file "${this_dir}/environment.yml" --prune

.circleci/unittest/windows/scripts/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ else
2626
fi
2727

2828
printf "Installing PyTorch with %s\n" "${cudatoolkit}"
29-
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" -c conda-forge pytorch "${cudatoolkit}"
29+
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" -c conda-forge "pytorch-${UPLOAD_CHANNEL}"::pytorch "${cudatoolkit}"
3030

3131
printf "* Installing torchvision\n"
3232
"$this_dir/vc_env_helper.bat" python setup.py develop

.circleci/unittest/windows/scripts/setup_env.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,4 @@ conda activate "${env_dir}"
3636

3737
# 3. Install Conda dependencies
3838
printf "* Installing dependencies (except PyTorch)\n"
39-
NUMPY_MIN_VER="1.11"
40-
if [[ "${PYTHON_VERSION}" = "3.9" ]]; then
41-
NUMPY_MIN_VER="1.20"
42-
fi
43-
conda install -y -c conda-forge "numpy >=${NUMPY_MIN_VER}"
4439
conda env update --file "${this_dir}/environment.yml" --prune

.github/workflows/tests-schedule.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ jobs:
2626
- name: Checkout repository
2727
uses: actions/checkout@v2
2828

29-
- name: Install PyTorch from the nightlies
30-
run: |
31-
pip install numpy
32-
pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
29+
- name: Install torch nightly build
30+
run: pip install --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
31+
32+
- name: Install torchvision
33+
run: pip install -e .
3334

3435
- name: Install all optional dataset requirements
3536
run: pip install scipy pandas pycocotools lmdb requests

0 commit comments

Comments
 (0)