ultralytics 8.0.198 MLflow fix, tests and Docs page (#5357)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
12e3eef844
commit
5b3c4cfc0e
11 changed files with 228 additions and 65 deletions
|
|
@ -1,16 +1,13 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
|
||||
import contextlib
|
||||
|
||||
import pytest
|
||||
import torch
|
||||
|
||||
from ultralytics import YOLO, download
|
||||
from ultralytics.utils import ASSETS, DATASETS_DIR, WEIGHTS_DIR
|
||||
from ultralytics.utils.checks import cuda_device_count, cuda_is_available
|
||||
from ultralytics.utils import ASSETS, DATASETS_DIR, WEIGHTS_DIR, checks
|
||||
|
||||
CUDA_IS_AVAILABLE = cuda_is_available()
|
||||
CUDA_DEVICE_COUNT = cuda_device_count()
|
||||
CUDA_IS_AVAILABLE = checks.cuda_is_available()
|
||||
CUDA_DEVICE_COUNT = checks.cuda_device_count()
|
||||
|
||||
MODEL = WEIGHTS_DIR / 'path with spaces' / 'yolov8n.pt' # test spaces in path
|
||||
DATA = 'coco8.yaml'
|
||||
|
|
@ -107,20 +104,6 @@ def test_predict_sam():
|
|||
predictor.reset_image()
|
||||
|
||||
|
||||
@pytest.mark.skipif(not CUDA_IS_AVAILABLE, reason='CUDA is not available')
|
||||
def test_model_ray_tune():
|
||||
"""Tune YOLO model with Ray optimization library."""
|
||||
with contextlib.suppress(RuntimeError): # RuntimeError may be caused by out-of-memory
|
||||
YOLO('yolov8n-cls.yaml').tune(use_ray=True,
|
||||
data='imagenet10',
|
||||
grace_period=1,
|
||||
iterations=1,
|
||||
imgsz=32,
|
||||
epochs=1,
|
||||
plots=False,
|
||||
device='cpu')
|
||||
|
||||
|
||||
@pytest.mark.skipif(not CUDA_IS_AVAILABLE, reason='CUDA is not available')
|
||||
def test_model_tune():
|
||||
"""Tune YOLO model for performance."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue