ultralytics 8.0.138 update hub/utils.py Events (#3839)

This commit is contained in:
Glenn Jocher
2023-07-20 01:11:55 +02:00
committed by GitHub
parent 85f191fbc7
commit 796bac229e
3 changed files with 10 additions and 7 deletions

View File

@ -1,6 +1,6 @@
# Ultralytics YOLO 🚀, AGPL-3.0 license
__version__ = '8.0.137'
__version__ = '8.0.138'
from ultralytics.engine.model import YOLO
from ultralytics.hub import start

View File

@ -13,6 +13,7 @@ from tqdm import tqdm
from ultralytics.utils import (ENVIRONMENT, LOGGER, ONLINE, RANK, SETTINGS, TESTS_RUNNING, TQDM_BAR_FORMAT, TryExcept,
__version__, colorstr, get_git_origin_url, is_colab, is_git_dir, is_pip_package)
from ultralytics.utils.downloads import GITHUB_ASSET_NAMES
PREFIX = colorstr('Ultralytics HUB: ')
HELP_MSG = 'If this issue persists please visit https://github.com/ultralytics/hub/issues for assistance.'
@ -193,7 +194,9 @@ class Events:
# Attempt to add to events
if len(self.events) < 25: # Events list limited to 25 events (drop any events past this)
params = {**self.metadata, **{'task': cfg.task}}
params = {
**self.metadata, 'task': cfg.task,
'model': cfg.model if cfg.model in GITHUB_ASSET_NAMES else 'custom'}
if cfg.mode == 'export':
params['format'] = cfg.format
self.events.append({'name': cfg.mode, 'params': params})