ultralytics 8.3.2 fix AMP checks with imgsz=256 (#16583)
This commit is contained in:
parent
c327b0aae1
commit
5af8a5c0fb
4 changed files with 13 additions and 3 deletions
|
|
@ -10,6 +10,7 @@ from tests import CUDA_DEVICE_COUNT, CUDA_IS_AVAILABLE, MODEL, SOURCE
|
|||
from ultralytics import YOLO
|
||||
from ultralytics.cfg import TASK2DATA, TASK2MODEL, TASKS
|
||||
from ultralytics.utils import ASSETS, WEIGHTS_DIR
|
||||
from ultralytics.utils.checks import check_amp
|
||||
|
||||
|
||||
def test_checks():
|
||||
|
|
@ -18,6 +19,13 @@ def test_checks():
|
|||
assert torch.cuda.device_count() == CUDA_DEVICE_COUNT
|
||||
|
||||
|
||||
@pytest.mark.skipif(not CUDA_IS_AVAILABLE, reason="CUDA is not available")
|
||||
def test_amp():
|
||||
"""Test AMP training checks."""
|
||||
model = YOLO("yolo11n.pt").model.cuda()
|
||||
assert check_amp(model)
|
||||
|
||||
|
||||
@pytest.mark.slow
|
||||
@pytest.mark.skipif(True, reason="CUDA export tests disabled pending additional Ultralytics GPU server availability")
|
||||
@pytest.mark.skipif(not CUDA_IS_AVAILABLE, reason="CUDA is not available")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue