From b5f1a70974a7eb38b9670125700ddd40d18d66e5 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 19 Oct 2024 00:41:13 +0200 Subject: [PATCH] Update YOLO login (#17022) Signed-off-by: UltralyticsAssistant Co-authored-by: UltralyticsAssistant --- ultralytics/cfg/__init__.py | 2 +- ultralytics/hub/__init__.py | 6 +++--- ultralytics/hub/auth.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ultralytics/cfg/__init__.py b/ultralytics/cfg/__init__.py index 4cdb123d81..153ab27e38 100644 --- a/ultralytics/cfg/__init__.py +++ b/ultralytics/cfg/__init__.py @@ -508,7 +508,7 @@ def handle_yolo_hub(args: List[str]) -> None: Examples: ```bash - yolo hub login YOUR_API_KEY + yolo login YOUR_API_KEY ``` Notes: diff --git a/ultralytics/hub/__init__.py b/ultralytics/hub/__init__.py index 9c9c9dfa16..5b1fc9faeb 100644 --- a/ultralytics/hub/__init__.py +++ b/ultralytics/hub/__init__.py @@ -63,13 +63,13 @@ def login(api_key: str = None, save=True) -> bool: return True else: # Failed to authenticate with HUB - LOGGER.info(f"{PREFIX}Get API key from {api_key_url} and then run 'yolo hub login API_KEY'") + LOGGER.info(f"{PREFIX}Get API key from {api_key_url} and then run 'yolo login API_KEY'") return False def logout(): """ - Log out of Ultralytics HUB by removing the API key from the settings file. To log in again, use 'yolo hub login'. + Log out of Ultralytics HUB by removing the API key from the settings file. To log in again, use 'yolo login'. Example: ```python @@ -79,7 +79,7 @@ def logout(): ``` """ SETTINGS["api_key"] = "" - LOGGER.info(f"{PREFIX}logged out ✅. To log in again, use 'yolo hub login'.") + LOGGER.info(f"{PREFIX}logged out ✅. To log in again, use 'yolo login'.") def reset_model(model_id=""): diff --git a/ultralytics/hub/auth.py b/ultralytics/hub/auth.py index 3c7c6d3d25..a12215bb20 100644 --- a/ultralytics/hub/auth.py +++ b/ultralytics/hub/auth.py @@ -68,7 +68,7 @@ class Auth: if verbose: LOGGER.info(f"{PREFIX}New authentication successful ✅") elif verbose: - LOGGER.info(f"{PREFIX}Get API key from {API_KEY_URL} and then run 'yolo hub login API_KEY'") + LOGGER.info(f"{PREFIX}Get API key from {API_KEY_URL} and then run 'yolo login API_KEY'") def request_api_key(self, max_attempts=3): """