diff --git a/src/axolotl/cli/checks.py b/src/axolotl/cli/checks.py index 10086c2a4..a743e74dc 100644 --- a/src/axolotl/cli/checks.py +++ b/src/axolotl/cli/checks.py @@ -6,6 +6,7 @@ from pathlib import Path from accelerate.commands.config import config_args from huggingface_hub import HfApi from huggingface_hub.utils import LocalTokenNotFoundError +from requests import HTTPError from axolotl.utils.logging import get_logger @@ -46,3 +47,8 @@ def check_user_token() -> bool: "Error verifying HuggingFace token. Remember to log in using `huggingface-cli login` and get your access token from https://huggingface.co/settings/tokens if you want to use gated models or datasets." ) return False + except HTTPError: + LOG.warning( + "Error accessing HuggingFace. This may be due to a network issue or rate limiting." + ) + return False