ultralytics 8.2.41 fix HUB unzip subdirectory bug (#13913)
This commit is contained in:
parent
9362e759f7
commit
e30b7c24f2
3 changed files with 13 additions and 7 deletions
|
|
@ -71,7 +71,11 @@ class HUBTrainingSession:
|
|||
"""Class method to create an authenticated HUBTrainingSession or return None."""
|
||||
try:
|
||||
session = cls(identifier)
|
||||
assert session.client.authenticated, "HUB not authenticated"
|
||||
if not session.client.authenticated:
|
||||
if identifier.startswith(f"{HUB_WEB_ROOT}/models/"):
|
||||
LOGGER.warning(f"{PREFIX}WARNING ⚠️ Login to Ultralytics HUB with 'yolo hub login API_KEY'.")
|
||||
exit()
|
||||
return None
|
||||
if args and not identifier.startswith(f"{HUB_WEB_ROOT}/models/"): # not a HUB model URL
|
||||
session.create_model(args)
|
||||
assert session.model.id, "HUB model not loaded correctly"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue