Fixing predict docs (#16637)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
bf51faeac5
commit
c773f27653
2 changed files with 19 additions and 19 deletions
|
|
@ -183,9 +183,9 @@ class Exporter:
|
|||
|
||||
# Get the closest match if format is invalid
|
||||
matches = difflib.get_close_matches(fmt, fmts, n=1, cutoff=0.6) # 60% similarity required to match
|
||||
if closest_match:
|
||||
if matches:
|
||||
LOGGER.warning(f"WARNING ⚠️ Invalid export format='{fmt}', updating to format='{matches[0]}'")
|
||||
fmt = closest_match[0]
|
||||
fmt = matches[0]
|
||||
else:
|
||||
raise ValueError(f"Invalid export format='{fmt}'. Valid formats are {fmts}")
|
||||
flags = [x == fmt for x in fmts]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue