Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refactor] code quality #289

Merged
merged 67 commits into from
Jul 18, 2021
Merged
Changes from 1 commit
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
9530562
isort
RangiLyu Jun 14, 2021
a2f3818
format
RangiLyu Jun 14, 2021
b0cdb3c
lint
RangiLyu Jun 19, 2021
4f3d5a1
add flake8 config
RangiLyu Jun 19, 2021
56e1ac3
lint
RangiLyu Jun 19, 2021
557ff0c
add isort config
RangiLyu Jun 19, 2021
c266ebb
add pre-commit
RangiLyu Jun 19, 2021
b7d8be8
format
RangiLyu Jun 19, 2021
4546163
fix string
RangiLyu Jun 19, 2021
f659c45
update
RangiLyu Jun 19, 2021
9e496a9
change to black code style
RangiLyu Jun 19, 2021
36351ee
add CI
RangiLyu Jun 19, 2021
0f04abe
isort style
RangiLyu Jun 19, 2021
3eb77bb
extend flake8
RangiLyu Jun 19, 2021
be551a6
add config unit test
RangiLyu Jun 20, 2021
74ef816
add CUDA test
RangiLyu Jun 20, 2021
1c4db4c
update workflow
RangiLyu Jun 20, 2021
f259409
fix torchvision version
RangiLyu Jun 20, 2021
5bac8d8
add conv unit test
RangiLyu Jun 20, 2021
64dcc39
remove cache
RangiLyu Jun 20, 2021
3490ee0
add repvgg conv test
RangiLyu Jun 20, 2021
ebae7e7
add nms unit test
RangiLyu Jun 26, 2021
9467bc7
add scale unit test
RangiLyu Jun 26, 2021
db58ccf
add test data
RangiLyu Jun 26, 2021
9f28958
fix workflow
RangiLyu Jun 26, 2021
4c5dacf
fix workflow
RangiLyu Jun 26, 2021
5d82473
fix workflow
RangiLyu Jun 26, 2021
a51017b
add transformer unit test
RangiLyu Jun 26, 2021
0b858f7
add init_weights unit test
RangiLyu Jun 26, 2021
035a7aa
add norm unit test
RangiLyu Jun 26, 2021
65ce4b6
add iou loss test and fix bug
RangiLyu Jun 26, 2021
a79f4b1
add gfl loss unit test
RangiLyu Jun 26, 2021
85e4007
fix pop
RangiLyu Jun 26, 2021
f2d8be7
iou coverage
RangiLyu Jun 26, 2021
51afd92
add shufflenet efficientnet unit test
RangiLyu Jun 26, 2021
fd5f825
fix lint
RangiLyu Jun 26, 2021
fc6764f
add resnet unit test
RangiLyu Jun 27, 2021
b5a65f0
add repvgg backbone unit test
RangiLyu Jul 4, 2021
95c67ff
add repvgg backbone unit test
RangiLyu Jul 4, 2021
a7858ac
add mbv2 backbone unit test
RangiLyu Jul 4, 2021
60bfd89
add csp backbone unit test
RangiLyu Jul 4, 2021
5a69f88
add csp backbone unit test
RangiLyu Jul 4, 2021
0c3906b
add csp backbone unit test
RangiLyu Jul 4, 2021
effea88
add ghostnet backbone unit test
RangiLyu Jul 4, 2021
25d609e
add pytorch lightning task unit test
RangiLyu Jul 4, 2021
89cb812
update flake8
RangiLyu Jul 4, 2021
c3ec3b2
fix pt1.6
RangiLyu Jul 4, 2021
3c3118e
add trainer unit test
RangiLyu Jul 4, 2021
739f844
use tmp dir
RangiLyu Jul 4, 2021
73ef835
replace dataset name in cfg
RangiLyu Jul 4, 2021
6eb4ce9
add cocodataset unit test
RangiLyu Jul 4, 2021
c9d5958
test collate
RangiLyu Jul 10, 2021
55d2ba5
add xml dataset unit test
RangiLyu Jul 10, 2021
aa82901
change build evaluator
RangiLyu Jul 10, 2021
a8a9bbd
add evaluator unit test
RangiLyu Jul 10, 2021
75f3f64
add transform unit test
RangiLyu Jul 11, 2021
47d4663
add GFL head unit test
RangiLyu Jul 11, 2021
6f24f42
add flops unit test
RangiLyu Jul 11, 2021
b8cb8b3
add coco instance seg unit test
RangiLyu Jul 17, 2021
e7b54cb
add nanodet head unit test
RangiLyu Jul 17, 2021
b8f8631
add fpn unit test
RangiLyu Jul 17, 2021
6c1b473
add pan unit test
RangiLyu Jul 17, 2021
00843f3
add pan unit test
RangiLyu Jul 17, 2021
b48e619
add tan unit test
RangiLyu Jul 17, 2021
5c06d4b
fix unit test
RangiLyu Jul 17, 2021
deaafc2
merge master
RangiLyu Jul 17, 2021
46a4962
Merge pull request #260 from RangiLyu/unit_test
RangiLyu Jul 18, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add CUDA test
  • Loading branch information
RangiLyu committed Jun 20, 2021
commit 74ef816badb4f4a7f28b43dfc02f2879c12bc44b
68 changes: 68 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,71 @@ jobs:
coverage run --branch --source nanodet -m pytest tests/
coverage xml
coverage report -m

test_cuda:
runs-on: ubuntu-latest
env:
CUDA: 10.1.105-1
CUDA_SHORT: 10.1
UBUNTU_VERSION: ubuntu1804
strategy:
matrix:
torch: [1.6.0+cu101, 1.7.0+cu101, 1.8.0+cu101]
include:
- torch: 1.6.0+cu101
torchvision: 0.7.0+cu101
- torch: 1.7.0+cu101
torchvision: 0.8.2+cu101
- torch: 1.8.0+cu101
torchvision: 0.9.0+cu101
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Install CUDA
run: |
export INSTALLER=cuda-repo-${UBUNTU_VERSION}_${CUDA}_amd64.deb
wget http://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/${INSTALLER}
sudo dpkg -i ${INSTALLER}
wget https://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/7fa2af80.pub
sudo apt-key add 7fa2af80.pub
sudo apt update -qq
sudo apt install -y cuda-${CUDA_SHORT/./-} cuda-cufft-dev-${CUDA_SHORT/./-}
sudo apt clean
export CUDA_HOME=/usr/local/cuda-${CUDA_SHORT}
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${CUDA_HOME}/include:${LD_LIBRARY_PATH}
export PATH=${CUDA_HOME}/bin:${PATH}
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
${{ env.pythonLocation }}/lib/python3.6/site-packages
~/.torch
key: ${{ runner.os }}-torch${{ matrix.torch }}-${{ hashFiles('setup.py') }}-20210420
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
python -m pip install Cython termcolor numpy tensorboard pycocotools matplotlib pyaml opencv-python tqdm pytorch-lightning torchmetrics codecov flake8 pytest
- name: Setup
run: |
rm -rf .eggs
python setup.py check -m -s
TORCH_CUDA_ARCH_LIST=7.0 pip install .
- name: Run unittests and generate coverage report
run: |
coverage run --branch --source nanodet -m pytest tests/
coverage xml
coverage report -m
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1.0.10
if: matrix.torch == '1.8.0+cu101'
with:
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false