Skip to content

Commit caa705e

Browse files
authored
Bump hfh to 0.24 to fix ci (#7350)
bump hfh O.24
1 parent ccccf10 commit caa705e

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

.github/conda/meta.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ requirements:
2424
- dataclasses
2525
- multiprocess
2626
- fsspec
27-
- huggingface_hub >=0.23.0,<1.0.0
27+
- huggingface_hub >=0.24.0,<1.0.0
2828
- packaging
2929
- aiohttp
3030
run:
@@ -40,7 +40,7 @@ requirements:
4040
- dataclasses
4141
- multiprocess
4242
- fsspec
43-
- huggingface_hub >=0.23.0,<1.0.0
43+
- huggingface_hub >=0.24.0,<1.0.0
4444
- packaging
4545
- aiohttp
4646

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
run: uv pip install --system --upgrade pyarrow huggingface-hub "dill<0.3.9"
6363
- name: Install dependencies (minimum versions)
6464
if: ${{ matrix.deps_versions != 'deps-latest' }}
65-
run: uv pip install --system pyarrow==15.0.0 huggingface-hub==0.23.5 transformers dill==0.3.1.1
65+
run: uv pip install --system pyarrow==15.0.0 huggingface-hub==0.24.7 transformers dill==0.3.1.1
6666
- name: Test with pytest
6767
run: |
6868
python -m pytest -rfExX -m ${{ matrix.test }} -n 2 --dist loadfile -sv ./tests/

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
# for data streaming via http
134134
"aiohttp",
135135
# To get datasets from the Datasets Hub on huggingface.co
136-
"huggingface-hub>=0.23.0",
136+
"huggingface-hub>=0.24.0",
137137
# Utilities from PyPA to e.g., compare versions
138138
"packaging",
139139
# To parse YAML metadata from dataset cards

tests/test_offline_util.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
from tempfile import NamedTemporaryFile
22

3-
import huggingface_hub
43
import pytest
54
import requests
6-
from packaging import version
75

86
from datasets.utils.file_utils import fsspec_get, fsspec_head
97

@@ -18,10 +16,8 @@ def test_offline_with_timeout():
1816
requests.request("GET", "https://huggingface.co")
1917
with pytest.raises(requests.exceptions.Timeout):
2018
requests.request("GET", "https://huggingface.co", timeout=1.0)
21-
# old versions of `huggingface_hub` don't have timeouts by default and don't allow to set timeouts in HfFileSystem
22-
if version.parse(huggingface_hub.__version__) >= version.parse("0.23.0"):
23-
with pytest.raises(requests.exceptions.Timeout), NamedTemporaryFile() as temp_file:
24-
fsspec_get("hf://dummy", temp_file=temp_file)
19+
with pytest.raises(requests.exceptions.Timeout), NamedTemporaryFile() as temp_file:
20+
fsspec_get("hf://dummy", temp_file=temp_file)
2521

2622

2723
@pytest.mark.integration

0 commit comments

Comments
 (0)