mirror of
https://github.com/open-mmlab/mmsegmentation.git
synced 2025-06-03 22:03:48 +08:00
[Improvement] Add more CI (#460)
* add more CI * fix missing * remove python-version * fixed acc
This commit is contained in:
parent
99ab9bd2d9
commit
d283ca6fea
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
@ -29,25 +29,26 @@ jobs:
|
|||||||
UBUNTU_VERSION: ubuntu1804
|
UBUNTU_VERSION: ubuntu1804
|
||||||
FORCE_CUDA: 1
|
FORCE_CUDA: 1
|
||||||
MMCV_CUDA_ARGS: -gencode=arch=compute_61,code=sm_61
|
MMCV_CUDA_ARGS: -gencode=arch=compute_61,code=sm_61
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-18.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: [ 3.6, 3.7 ]
|
python-version: [ 3.6, 3.7 ]
|
||||||
torch: [1.3.0+cpu, 1.5.0+cpu]
|
torch: [ 1.3.0+cpu, 1.5.0+cpu, 1.5.0+cu101, 1.6.0+cu101, 1.7.0+cu101, 1.8.0+cu101 ]
|
||||||
include:
|
include:
|
||||||
- torch: 1.3.0+cpu
|
- torch: 1.3.0+cpu
|
||||||
torchvision: 0.4.1+cpu
|
torchvision: 0.4.1+cpu
|
||||||
- torch: 1.5.0+cpu
|
- torch: 1.5.0+cpu
|
||||||
torchvision: 0.6.0+cpu
|
torchvision: 0.6.0+cpu
|
||||||
- torch: 1.5.0+cpu
|
|
||||||
torchvision: 0.6.0+cpu
|
|
||||||
python-version: 3.8
|
|
||||||
- torch: 1.5.0+cu101
|
- torch: 1.5.0+cu101
|
||||||
torchvision: 0.6.0+cu101
|
torchvision: 0.6.0+cu101
|
||||||
python-version: 3.7
|
|
||||||
- torch: 1.6.0+cu101
|
- torch: 1.6.0+cu101
|
||||||
torchvision: 0.7.0+cu101
|
torchvision: 0.7.0+cu101
|
||||||
python-version: 3.7
|
- torch: 1.7.0+cu101
|
||||||
|
torchvision: 0.8.1+cu101
|
||||||
|
- torch: 1.8.0+cu101
|
||||||
|
torchvision: 0.9.0+cu101
|
||||||
|
- torch: 1.8.0+cu101
|
||||||
|
torchvision: 0.9.0+cu101
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -56,7 +57,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Install CUDA
|
- name: Install CUDA
|
||||||
if: ${{matrix.torch == '1.5.0+cu101'}}
|
if: ${{matrix.torch == '1.5.0+cu101' || matrix.torch == '1.6.0+cu101' || matrix.torch == '1.7.0+cu101' || matrix.torch == '1.8.0+cu101'}}
|
||||||
run: |
|
run: |
|
||||||
export INSTALLER=cuda-repo-${UBUNTU_VERSION}_${CUDA}_amd64.deb
|
export INSTALLER=cuda-repo-${UBUNTU_VERSION}_${CUDA}_amd64.deb
|
||||||
wget http://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/${INSTALLER}
|
wget http://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/${INSTALLER}
|
||||||
@ -88,7 +89,7 @@ jobs:
|
|||||||
coverage report -m
|
coverage report -m
|
||||||
# Only upload coverage report for python3.7 && pytorch1.5
|
# Only upload coverage report for python3.7 && pytorch1.5
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
if: ${{matrix.torch == '1.5.0+cu101' && matrix.python-version == '3.7'}}
|
if: ${{matrix.torch == '1.8.0+cu101' && matrix.python-version == '3.7'}}
|
||||||
uses: codecov/codecov-action@v1.0.10
|
uses: codecov/codecov-action@v1.0.10
|
||||||
with:
|
with:
|
||||||
file: ./coverage.xml
|
file: ./coverage.xml
|
||||||
|
@ -161,10 +161,10 @@
|
|||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"Cloning into 'mmsegmentation'...\n",
|
"Cloning into 'mmsegmentation'...\n",
|
||||||
"remote: Enumerating objects: 64, done.\u001b[K\n",
|
"remote: Enumerating objects: 64, done.\u001B[K\n",
|
||||||
"remote: Counting objects: 100% (64/64), done.\u001b[K\n",
|
"remote: Counting objects: 100% (64/64), done.\u001B[K\n",
|
||||||
"remote: Compressing objects: 100% (60/60), done.\u001b[K\n",
|
"remote: Compressing objects: 100% (60/60), done.\u001B[K\n",
|
||||||
"remote: Total 2194 (delta 17), reused 12 (delta 4), pack-reused 2130\u001b[K\n",
|
"remote: Total 2194 (delta 17), reused 12 (delta 4), pack-reused 2130\u001B[K\n",
|
||||||
"Receiving objects: 100% (2194/2194), 3.35 MiB | 26.82 MiB/s, done.\n",
|
"Receiving objects: 100% (2194/2194), 3.35 MiB | 26.82 MiB/s, done.\n",
|
||||||
"Resolving deltas: 100% (1536/1536), done.\n",
|
"Resolving deltas: 100% (1536/1536), done.\n",
|
||||||
"/content/mmsegmentation\n",
|
"/content/mmsegmentation\n",
|
||||||
|
@ -44,7 +44,7 @@ def accuracy(pred, target, topk=1, thresh=None):
|
|||||||
correct = correct & (pred_value > thresh).t()
|
correct = correct & (pred_value > thresh).t()
|
||||||
res = []
|
res = []
|
||||||
for k in topk:
|
for k in topk:
|
||||||
correct_k = correct[:k].view(-1).float().sum(0, keepdim=True)
|
correct_k = correct[:k].reshape(-1).float().sum(0, keepdim=True)
|
||||||
res.append(correct_k.mul_(100.0 / target.numel()))
|
res.append(correct_k.mul_(100.0 / target.numel()))
|
||||||
return res[0] if return_single else res
|
return res[0] if return_single else res
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user