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

single_channel
Glenn Jocher 1 year ago committed by GitHub
parent 85f191fbc7
commit 796bac229e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -30,12 +30,12 @@ Creating a custom model to detect your objects is an iterative process of collec
YOLOv5 models must be trained on labelled data in order to learn classes of objects in that data. There are two options for creating your dataset before you start training: YOLOv5 models must be trained on labelled data in order to learn classes of objects in that data. There are two options for creating your dataset before you start training:
<details markdown> <details open markdown>
<summary>Use <a href="https://roboflow.com/?ref=ultralytics">Roboflow</a> to create your dataset in YOLO format</summary> <summary>Use <a href="https://roboflow.com/?ref=ultralytics">Roboflow</a> to create your dataset in YOLO format 🌟</summary>
!!! warning !!! note
Roboflow users can use Ultralytics under the [AGPL license](https://github.com/ultralytics/ultralytics/blob/main/LICENSE) or procure an [Enterprise license](https://ultralytics.com/license) directly from Ultralytics. Be aware that Roboflow does **not** provide Ultralytics licenses, and it is the responsibility of the user to ensure appropriate licensing. Roboflow users can use Ultralytics under the [AGPL license](https://github.com/ultralytics/ultralytics/blob/main/LICENSE) or can request an [Enterprise license](https://ultralytics.com/license) directly from Ultralytics. Be aware that Roboflow does not provide Ultralytics licenses, and it is the responsibility of the user to ensure appropriate licensing.
### 1.1 Collect Images ### 1.1 Collect Images
@ -84,7 +84,7 @@ script or notebook to download your dataset.
Now continue with `2. Select a Model`. Now continue with `2. Select a Model`.
</details> </details>
<details open markdown> <details markdown>
<summary>Or manually prepare your dataset</summary> <summary>Or manually prepare your dataset</summary>
### 1.1 Create dataset.yaml ### 1.1 Create dataset.yaml

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

@ -13,6 +13,7 @@ from tqdm import tqdm
from ultralytics.utils import (ENVIRONMENT, LOGGER, ONLINE, RANK, SETTINGS, TESTS_RUNNING, TQDM_BAR_FORMAT, TryExcept, 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) __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: ') PREFIX = colorstr('Ultralytics HUB: ')
HELP_MSG = 'If this issue persists please visit https://github.com/ultralytics/hub/issues for assistance.' 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 # Attempt to add to events
if len(self.events) < 25: # Events list limited to 25 events (drop any events past this) 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': if cfg.mode == 'export':
params['format'] = cfg.format params['format'] = cfg.format
self.events.append({'name': cfg.mode, 'params': params}) self.events.append({'name': cfg.mode, 'params': params})

Loading…
Cancel
Save