ultralytics 8.0.181 RTDETR, MLFlow fixes and Examples updates (#4927)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Jordane Sikati <jordanesikati@pusan.ac.kr> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Akash A Desai <62583018+akashAD98@users.noreply.github.com> Co-authored-by: Lukas Hennies <45569834+Gornoka@users.noreply.github.com> Co-authored-by: 唐洁 <tangjie1953479@tongji.edu.cn>
This commit is contained in:
parent
5702b2dccd
commit
742ec7fb1d
9 changed files with 46 additions and 26 deletions
|
|
@ -7,9 +7,10 @@ import torch
|
|||
|
||||
from ultralytics import YOLO, download
|
||||
from ultralytics.utils import ASSETS, SETTINGS
|
||||
from ultralytics.utils.checks import cuda_device_count, cuda_is_available
|
||||
|
||||
CUDA_IS_AVAILABLE = torch.cuda.is_available()
|
||||
CUDA_DEVICE_COUNT = torch.cuda.device_count()
|
||||
CUDA_IS_AVAILABLE = cuda_is_available()
|
||||
CUDA_DEVICE_COUNT = cuda_device_count()
|
||||
|
||||
DATASETS_DIR = Path(SETTINGS['datasets_dir'])
|
||||
WEIGHTS_DIR = Path(SETTINGS['weights_dir'])
|
||||
|
|
@ -18,10 +19,8 @@ DATA = 'coco8.yaml'
|
|||
|
||||
|
||||
def test_checks():
|
||||
from ultralytics.utils.checks import cuda_device_count, cuda_is_available
|
||||
|
||||
assert cuda_device_count() == CUDA_DEVICE_COUNT
|
||||
assert cuda_is_available() == CUDA_IS_AVAILABLE
|
||||
assert torch.cuda.is_available() == CUDA_IS_AVAILABLE
|
||||
assert torch.cuda.device_count() == CUDA_DEVICE_COUNT
|
||||
|
||||
|
||||
@pytest.mark.skipif(not CUDA_IS_AVAILABLE, reason='CUDA is not available')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue