Skip to content

Commit f256a32

Browse files
Add HfFileSystem to the registry (#1241)
Co-authored-by: Martin Durant <martindurant@users.noreply.github.com>
1 parent 28ca455 commit f256a32

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docs/source/api.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ Other Known Implementations
207207
- `dvc`_ to access DVC/Git repository as a filesystem
208208
- `gcsfs`_ for Google Cloud Storage
209209
- `gdrive`_ to access Google Drive and shares (experimental)
210+
- `huggingface_hub` to access the Hugging Face Hub filesystem, with protocol "hf://"
210211
- `ocifs`_ for access to Oracle Cloud Object Storage
211212
- `ossfs`_ for Alibaba Cloud (Aliyun) Object Storage System (OSS)
212213
- `s3fs`_ for Amazon S3 and other compatible stores
@@ -219,6 +220,7 @@ Other Known Implementations
219220
.. _dvc: https://github.com/iterative/dvc
220221
.. _gcsfs: https://gcsfs.readthedocs.io/en/latest/
221222
.. _gdrive: https://github.com/fsspec/gdrivefs
223+
.. _huggingface_hub: https://huggingface.co/docs/huggingface_hub/main/en/guides/hf_file_system
222224
.. _ocifs: https://pypi.org/project/ocifs
223225
.. _ossfs: https://github.com/fsspec/ossfs
224226
.. _s3fs: https://s3fs.readthedocs.io/en/latest/

fsspec/registry.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ def register_implementation(name, cls, clobber=False, errtxt=None):
179179
"class": "dvc.api.DVCFileSystem",
180180
"err": "Install dvc to access DVCFileSystem",
181181
},
182+
"hf": {
183+
"class": "huggingface_hub.HfFileSystem",
184+
"err": "Install huggingface_hub to access HfFileSystem",
185+
},
182186
"root": {
183187
"class": "fsspec_xrootd.XRootDFileSystem",
184188
"err": "Install fsspec-xrootd to access xrootd storage system."

0 commit comments

Comments
 (0)