File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change 7
7
8
8
import huggingface_hub
9
9
from fsspec .core import url_to_fs
10
- from fsspec .implementations .http import HTTPFileSystem
11
10
from huggingface_hub import HfFileSystem
12
11
from packaging import version
13
12
from tqdm .contrib .concurrent import thread_map
@@ -485,7 +484,7 @@ def _get_single_origin_metadata(
485
484
if isinstance (fs , HfFileSystem ):
486
485
resolved_path = fs .resolve_path (data_file )
487
486
return resolved_path .repo_id , resolved_path .revision
488
- elif isinstance ( fs , HTTPFileSystem ) and data_file .startswith (config .HF_ENDPOINT ):
487
+ elif data_file .startswith (config .HF_ENDPOINT ):
489
488
hffs = HfFileSystem (endpoint = config .HF_ENDPOINT , token = download_config .token )
490
489
data_file = "hf://" + data_file [len (config .HF_ENDPOINT ) + 1 :].replace ("/resolve/" , "@" , 1 )
491
490
resolved_path = hffs .resolve_path (data_file )
Original file line number Diff line number Diff line change 44
44
from .extract import ExtractManager
45
45
from .track import TrackedIterableFromGenerator
46
46
47
+
47
48
try :
48
49
from aiohttp .client_exceptions import ClientError as _AiohttpClientError
49
50
except ImportError :
You can’t perform that action at this time.
0 commit comments