Update YOLO login (#17022)

Signed-off-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
Glenn Jocher 2024-10-19 00:41:13 +02:00 committed by GitHub
parent 9f8cf111c4
commit b5f1a70974
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View file

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

View file

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

View file

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