8.0.60 new HUB training syntax (#1753)

Co-authored-by: Rafael Pierre <97888102+rafaelvp-db@users.noreply.github.com>
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: Semih Demirel <85176438+semihhdemirel@users.noreply.github.com>
This commit is contained in:
Glenn Jocher 2023-04-03 02:36:58 +02:00 committed by GitHub
parent e7876e1ba9
commit 84948651cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 405 additions and 122 deletions

View file

@ -7,7 +7,7 @@ on:
push:
branches: [main]
pull_request:
branches: [main]
branches: [main, updates]
schedule:
- cron: '0 0 * * *' # runs at 00:00 UTC every day
@ -43,16 +43,36 @@ jobs:
python --version
pip --version
pip list
- name: Test HUB training
- name: Test HUB training (Python Usage 1)
shell: python
env:
APIKEY: ${{ secrets.ULTRALYTICS_HUB_APIKEY }}
run: |
import os
from ultralytics import hub
from pathlib import Path
from ultralytics import YOLO, hub
from ultralytics.yolo.utils import USER_CONFIG_DIR
Path(USER_CONFIG_DIR / 'settings.yaml').unlink()
key = os.environ['APIKEY']
hub.reset_model(key)
hub.start(key)
model = YOLO('https://hub.ultralytics.com/models/' + key)
model.train()
- name: Test HUB training (Python Usage 2)
shell: python
env:
APIKEY: ${{ secrets.ULTRALYTICS_HUB_APIKEY }}
run: |
import os
from pathlib import Path
from ultralytics import YOLO, hub
from ultralytics.yolo.utils import USER_CONFIG_DIR
Path(USER_CONFIG_DIR / 'settings.yaml').unlink()
key = os.environ['APIKEY']
hub.reset_model(key)
key, model_id = key.split('_')
hub.login(key)
model = YOLO('https://hub.ultralytics.com/models/' + model_id)
model.train()
Benchmarks:
runs-on: ${{ matrix.os }}