ultralytics 8.3.8 replace contextlib with try for speed (#16782)

Signed-off-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
Glenn Jocher 2024-10-08 21:02:40 +02:00 committed by GitHub
parent 1e6c454460
commit a6a577961f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 115 additions and 88 deletions

View file

@ -669,9 +669,10 @@ def smart_value(v):
elif v_lower == "false":
return False
else:
with contextlib.suppress(Exception):
try:
return eval(v)
return v
except: # noqa E722
return v
def entrypoint(debug=""):