Remove YOLO11n message from AMP logs (#17075)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
pull/17065/head^2
Mohammed Yasin 1 month ago committed by GitHub
parent 0535db9885
commit b9747791df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      ultralytics/utils/checks.py

@ -688,7 +688,7 @@ def check_amp(model):
im = ASSETS / "bus.jpg" # image to check
prefix = colorstr("AMP: ")
LOGGER.info(f"{prefix}running Automatic Mixed Precision (AMP) checks with YOLO11n...")
LOGGER.info(f"{prefix}running Automatic Mixed Precision (AMP) checks...")
warning_msg = "Setting 'amp=True'. If you experience zero-mAP or NaN losses you can disable AMP with amp=False."
try:
from ultralytics import YOLO
@ -696,11 +696,13 @@ def check_amp(model):
assert amp_allclose(YOLO("yolo11n.pt"), im)
LOGGER.info(f"{prefix}checks passed ✅")
except ConnectionError:
LOGGER.warning(f"{prefix}checks skipped ⚠, offline and unable to download YOLO11n. {warning_msg}")
LOGGER.warning(
f"{prefix}checks skipped ⚠. " f"Offline and unable to download YOLO11n for AMP checks. {warning_msg}"
)
except (AttributeError, ModuleNotFoundError):
LOGGER.warning(
f"{prefix}checks skipped ⚠. "
f"Unable to load YOLO11n due to possible Ultralytics package modifications. {warning_msg}"
f"Unable to load YOLO11n for AMP checks due to possible Ultralytics package modifications. {warning_msg}"
)
except AssertionError:
LOGGER.warning(

Loading…
Cancel
Save