Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
python -c 'import torch; print(torch.rand(5, 3, device=torch.device("cuda:0")))'
BUILD_MONAI=1 ./runtests.sh --build --coverage --unittests --disttests # unit tests with coverage report
BUILD_MONAI=1 ./runtests.sh --build --coverage --net # integration tests with coverage report
coverage xml
coverage xml --ignore-errors
if pgrep python; then pkill python; fi
- name: Upload coverage
uses: codecov/codecov-action@v1
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
python -c 'import torch; print(torch.rand(5, 3, device=torch.device("cuda:0")))'
BUILD_MONAI=1 ./runtests.sh --build --coverage --unittests --disttests # unit tests with coverage report
BUILD_MONAI=1 ./runtests.sh --build --coverage --net # integration tests with coverage report
coverage xml
coverage xml --ignore-errors
if pgrep python; then pkill python; fi
- name: Upload coverage
uses: codecov/codecov-action@v1
Expand Down Expand Up @@ -192,7 +192,7 @@ jobs:
ngc --version
BUILD_MONAI=1 ./runtests.sh --build --coverage --pytype --unittests --disttests # unit tests with pytype checks, coverage report
BUILD_MONAI=1 ./runtests.sh --build --coverage --net # integration tests with coverage report
coverage xml
coverage xml --ignore-errors
if pgrep python; then pkill python; fi
- name: Upload coverage
uses: codecov/codecov-action@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pythonapp-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ jobs:
# test the clang-format tool downloading once
coverage run -m tests.clang_format_utils
fi
coverage xml
coverage xml --ignore-errors
if pgrep python; then pkill python; fi
shell: bash
- name: Upload coverage
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/setupapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
python -c 'import torch; print(torch.rand(5, 3, device=torch.device("cuda:0")))'
BUILD_MONAI=1 ./runtests.sh --build --coverage --unittests --disttests # unit tests with coverage report
BUILD_MONAI=1 ./runtests.sh --build --coverage --net # integration tests with coverage report
coverage xml
coverage xml --ignore-errors
if pgrep python; then pkill python; fi
shell: bash
- name: Upload coverage
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
python -m pip list
python -c 'import torch; print(torch.__version__); print(torch.rand(5,3))'
BUILD_MONAI=1 ./runtests.sh --build --quick --unittests --disttests
coverage xml
coverage xml --ignore-errors
- name: Upload coverage
uses: codecov/codecov-action@v1
with:
Expand Down
15 changes: 5 additions & 10 deletions tests/test_video_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import os
import unittest
from contextlib import nullcontext
from typing import Type, Union

import torch
Expand Down Expand Up @@ -49,15 +48,11 @@ def test_no_opencv_raises(self):

@unittest.skipUnless(has_cv2, "OpenCV required.")
def test_multiprocessing(self):
for multiprocessing in (True, False):
for num_workers in (0, 2):
# we only expect an error if num_workers > 0 and not using
# multiprocessing
expect_raise = num_workers == 2 and not multiprocessing
ds = self.get_ds(max_num_frames=100, multiprocessing=multiprocessing)
dl = DataLoader(ds, num_workers=num_workers, batch_size=2)
with self.assertRaises((TypeError, RuntimeError)) if expect_raise else nullcontext():
_ = next(iter(dl))
for num_workers in (0, 2):
multiprocessing = num_workers > 0
ds = self.get_ds(max_num_frames=100, multiprocessing=multiprocessing)
dl = DataLoader(ds, num_workers=num_workers, batch_size=2)
_ = next(iter(dl))

@unittest.skipUnless(has_cv2, "OpenCV required.")
def test_multiple_sources(self, should_match: bool = True):
Expand Down