Ultralytics Code Refactor https://ultralytics.com/actions (#14109)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
ff63a56a42
commit
691b5daccb
16 changed files with 124 additions and 113 deletions
|
|
@ -12,12 +12,12 @@ from ultralytics.utils import ASSETS, DEFAULT_CFG, WEIGHTS_DIR
|
|||
|
||||
|
||||
def test_func(*args): # noqa
|
||||
"""Test function callback."""
|
||||
"""Test function callback for evaluating YOLO model performance metrics."""
|
||||
print("callback test passed")
|
||||
|
||||
|
||||
def test_export():
|
||||
"""Test model exporting functionality."""
|
||||
"""Tests the model exporting function by adding a callback and asserting its execution."""
|
||||
exporter = Exporter()
|
||||
exporter.add_callback("on_export_start", test_func)
|
||||
assert test_func in exporter.callbacks["on_export_start"], "callback test failed"
|
||||
|
|
@ -26,7 +26,7 @@ def test_export():
|
|||
|
||||
|
||||
def test_detect():
|
||||
"""Test object detection functionality."""
|
||||
"""Test YOLO object detection training, validation, and prediction functionality."""
|
||||
overrides = {"data": "coco8.yaml", "model": "yolov8n.yaml", "imgsz": 32, "epochs": 1, "save": False}
|
||||
cfg = get_cfg(DEFAULT_CFG)
|
||||
cfg.data = "coco8.yaml"
|
||||
|
|
@ -65,7 +65,7 @@ def test_detect():
|
|||
|
||||
|
||||
def test_segment():
|
||||
"""Test image segmentation functionality."""
|
||||
"""Tests image segmentation training, validation, and prediction pipelines using YOLO models."""
|
||||
overrides = {"data": "coco8-seg.yaml", "model": "yolov8n-seg.yaml", "imgsz": 32, "epochs": 1, "save": False}
|
||||
cfg = get_cfg(DEFAULT_CFG)
|
||||
cfg.data = "coco8-seg.yaml"
|
||||
|
|
@ -104,7 +104,7 @@ def test_segment():
|
|||
|
||||
|
||||
def test_classify():
|
||||
"""Test image classification functionality."""
|
||||
"""Test image classification including training, validation, and prediction phases."""
|
||||
overrides = {"data": "imagenet10", "model": "yolov8n-cls.yaml", "imgsz": 32, "epochs": 1, "save": False}
|
||||
cfg = get_cfg(DEFAULT_CFG)
|
||||
cfg.data = "imagenet10"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue