updated test
This commit is contained in:
Родитель
34ff971fc9
Коммит
b493739e93
|
@ -14,8 +14,7 @@ steps:
|
|||
- bash: |
|
||||
source activate cv
|
||||
python -m ipykernel install --user --name cv --display-name "cv"
|
||||
pytest --durations 100 tests/unit --junitxml=junit/test-unitttest.xml
|
||||
pytest --durations 100 tests/integration --junitxml=junit/test-unitttest.xml
|
||||
pytest --durations 100 tests --junitxml=junit/test-unitttest.xml
|
||||
displayName: 'Run unit and (only on Linux GPU) integration tests'
|
||||
|
||||
- bash: |
|
||||
|
|
|
@ -11,3 +11,12 @@ def which_processor():
|
|||
print(f"Fast.ai (Torch) is using GPU: {get_device_name(device_nr)}")
|
||||
else:
|
||||
print("Cuda is not available. Fast.ai/Torch is using CPU")
|
||||
|
||||
|
||||
# Helper function to check if GPU machine which linux.
|
||||
# Integration tests are too slow on Windows/CPU machines.
|
||||
def linux_with_gpu():
|
||||
"""Returns if machine is running an Linux OS and has a GPU"""
|
||||
is_linux = platform.system().lower() == "linux"
|
||||
has_gpu = is_available()
|
||||
return is_linux and has_gpu
|
||||
|
|
Загрузка…
Ссылка в новой задаче