Skip to content

Commit

Permalink
Fix HTTPError when Too Many Requests for huggingface hub (#7765)
Browse files Browse the repository at this point in the history
Fixes #7764

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [ ] New tests added to cover the changes.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.

Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
  • Loading branch information
KumoLiu committed May 13, 2024
1 parent ab4bd43 commit daf2e71
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ def skip_if_downloading_fails():
"limit", # HTTP Error 503: Egress is over the account limit
"authenticate",
"timed out", # urlopen error [Errno 110] Connection timed out
"HTTPError", # HTTPError: 429 Client Error: Too Many Requests for huggingface hub
)
):
raise unittest.SkipTest(f"error while downloading: {rt_e}") from rt_e # incomplete download
Expand Down

0 comments on commit daf2e71

Please sign in to comment.