ultralytics 8.0.37
add TFLite metadata in AutoBackend (#953)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ayush Chaurasia <ayush.chaurarsia@gmail.com> Co-authored-by: Yonghye Kwon <developer.0hye@gmail.com> Co-authored-by: Aarni Koskela <akx@iki.fi>
This commit is contained in:
@ -221,11 +221,10 @@ def is_jupyter():
|
||||
Returns:
|
||||
bool: True if running inside a Jupyter Notebook, False otherwise.
|
||||
"""
|
||||
try:
|
||||
with contextlib.suppress(Exception):
|
||||
from IPython import get_ipython
|
||||
return get_ipython() is not None
|
||||
except ImportError:
|
||||
return False
|
||||
return False
|
||||
|
||||
|
||||
def is_docker() -> bool:
|
||||
@ -287,11 +286,9 @@ def is_pytest_running():
|
||||
Returns:
|
||||
(bool): True if pytest is running, False otherwise.
|
||||
"""
|
||||
try:
|
||||
import sys
|
||||
with contextlib.suppress(Exception):
|
||||
return "pytest" in sys.modules
|
||||
except ImportError:
|
||||
return False
|
||||
return False
|
||||
|
||||
|
||||
def is_github_actions_ci() -> bool:
|
||||
|
@ -1 +1,5 @@
|
||||
from .base import add_integration_callbacks, default_callbacks
|
||||
|
||||
__all__ = [
|
||||
'add_integration_callbacks',
|
||||
'default_callbacks',]
|
||||
|
@ -17,7 +17,6 @@ import numpy as np
|
||||
import pkg_resources as pkg
|
||||
import psutil
|
||||
import torch
|
||||
from IPython import display
|
||||
from matplotlib import font_manager
|
||||
|
||||
from ultralytics.yolo.utils import (AUTOINSTALL, LOGGER, ROOT, USER_CONFIG_DIR, TryExcept, colorstr, downloads, emojis,
|
||||
@ -292,8 +291,10 @@ def check_yolo(verbose=True):
|
||||
gib = 1 << 30 # bytes per GiB
|
||||
ram = psutil.virtual_memory().total
|
||||
total, used, free = shutil.disk_usage("/")
|
||||
display.clear_output()
|
||||
s = f'({os.cpu_count()} CPUs, {ram / gib:.1f} GB RAM, {(total - free) / gib:.1f}/{total / gib:.1f} GB disk)'
|
||||
with contextlib.suppress(Exception): # clear display if ipython is installed
|
||||
from IPython import display
|
||||
display.clear_output()
|
||||
else:
|
||||
s = ''
|
||||
|
||||
|
Reference in New Issue
Block a user