Minimize GitHub assets API calls (#4523)
This commit is contained in:
parent
7e1f7a9d28
commit
a7419617a6
3 changed files with 23 additions and 29 deletions
|
|
@ -13,7 +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
|
||||
from ultralytics.utils.downloads import GITHUB_ASSETS_NAMES
|
||||
|
||||
PREFIX = colorstr('Ultralytics HUB: ')
|
||||
HELP_MSG = 'If this issue persists please visit https://github.com/ultralytics/hub/issues for assistance.'
|
||||
|
|
@ -197,7 +197,7 @@ class Events:
|
|||
if len(self.events) < 25: # Events list limited to 25 events (drop any events past this)
|
||||
params = {
|
||||
**self.metadata, 'task': cfg.task,
|
||||
'model': cfg.model if cfg.model in GITHUB_ASSET_NAMES else 'custom'}
|
||||
'model': cfg.model if cfg.model in GITHUB_ASSETS_NAMES else 'custom'}
|
||||
if cfg.mode == 'export':
|
||||
params['format'] = cfg.format
|
||||
self.events.append({'name': cfg.mode, 'params': params})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue