ultralytics 8.0.62 HUB Syntax updates and fixes (#1795)
Co-authored-by: Danny Kim <imbird0312@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: MagicCodess <32194768+MagicCodess@users.noreply.github.com> Co-authored-by: ayush chaurasia <ayush.chaurarsia@gmail.com> Co-authored-by: Amjad Alsharafi <26300843+Amjad50@users.noreply.github.com>
This commit is contained in:
parent
4198570a4b
commit
37274c9845
19 changed files with 189 additions and 97 deletions
30
.github/workflows/ci.yaml
vendored
30
.github/workflows/ci.yaml
vendored
|
|
@ -73,6 +73,36 @@ jobs:
|
|||
hub.login(key)
|
||||
model = YOLO('https://hub.ultralytics.com/models/' + model_id)
|
||||
model.train()
|
||||
- name: Test HUB training (Python Usage 3)
|
||||
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)
|
||||
model = YOLO(key)
|
||||
model.train()
|
||||
- name: Test HUB training (Python Usage 4)
|
||||
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(model_id)
|
||||
model.train()
|
||||
|
||||
Benchmarks:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue