Update YOLO login (#17022)

Signed-off-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
pull/17023/head^2
Glenn Jocher 1 month ago committed by GitHub
parent 9f8cf111c4
commit b5f1a70974
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      ultralytics/cfg/__init__.py
  2. 6
      ultralytics/hub/__init__.py
  3. 2
      ultralytics/hub/auth.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:

@ -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=""):

@ -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):
"""

Loading…
Cancel
Save