Fix deprecation warning (#14091)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
pull/14085/head^2
Glenn Jocher 5 months ago committed by GitHub
parent 9d06438aa1
commit 48f4800ec6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      ultralytics/utils/__init__.py

@ -1026,13 +1026,10 @@ class SettingsManager(dict):
self.save()
def deprecation_warn(arg, new_arg, version=None):
def deprecation_warn(arg, new_arg):
"""Issue a deprecation warning when a deprecated argument is used, suggesting an updated argument."""
if not version:
version = float(__version__[:3]) + 0.2 # deprecate after 2nd major release
LOGGER.warning(
f"WARNING ⚠ '{arg}' is deprecated and will be removed in 'ultralytics {version}' in the future. "
f"Please use '{new_arg}' instead."
f"WARNING ⚠ '{arg}' is deprecated and will be removed in in the future. " f"Please use '{new_arg}' instead."
)

Loading…
Cancel
Save