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:
parent
e7876e1ba9
commit
84948651cd
25 changed files with 405 additions and 122 deletions
28
.github/workflows/ci.yaml
vendored
28
.github/workflows/ci.yaml
vendored
|
|
@ -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 }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue