Update YOLO login (#17022)
Signed-off-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
9f8cf111c4
commit
b5f1a70974
3 changed files with 5 additions and 5 deletions
|
|
@ -508,7 +508,7 @@ def handle_yolo_hub(args: List[str]) -> None:
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
```bash
|
```bash
|
||||||
yolo hub login YOUR_API_KEY
|
yolo login YOUR_API_KEY
|
||||||
```
|
```
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
|
|
|
||||||
|
|
@ -63,13 +63,13 @@ def login(api_key: str = None, save=True) -> bool:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
# Failed to authenticate with HUB
|
# 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
|
return False
|
||||||
|
|
||||||
|
|
||||||
def logout():
|
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:
|
Example:
|
||||||
```python
|
```python
|
||||||
|
|
@ -79,7 +79,7 @@ def logout():
|
||||||
```
|
```
|
||||||
"""
|
"""
|
||||||
SETTINGS["api_key"] = ""
|
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=""):
|
def reset_model(model_id=""):
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ class Auth:
|
||||||
if verbose:
|
if verbose:
|
||||||
LOGGER.info(f"{PREFIX}New authentication successful ✅")
|
LOGGER.info(f"{PREFIX}New authentication successful ✅")
|
||||||
elif verbose:
|
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):
|
def request_api_key(self, max_attempts=3):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue