Fix deprecation warning (#14091)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
9d06438aa1
commit
48f4800ec6
1 changed files with 2 additions and 5 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue