Skip to content

Commit

Permalink
Faster HfFileSystem.find (#1809)
Browse files Browse the repository at this point in the history
* Remove `HfFileSystem.exists` override

* Add `list_repo_tree` to the API

* Rename `BlobLastCommitInfo` to `LastCommitInfo`

* Add `get_paths_info` to the API

* Improve HfFileSystem tests

* Faster `HfFileSystem.find`

* Tests

* Update src/huggingface_hub/hf_api.py

Co-authored-by: Lucain <[email protected]>

* Address the rest of comments

* Fix comment

---------

Co-authored-by: Lucain <[email protected]>
  • Loading branch information
mariosasko and Wauplin authored Nov 10, 2023
1 parent 18d0ae2 commit 7297957
Show file tree
Hide file tree
Showing 5 changed files with 776 additions and 128 deletions.
4 changes: 4 additions & 0 deletions src/huggingface_hub/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@
"get_full_repo_name",
"get_inference_endpoint",
"get_model_tags",
"get_paths_info",
"get_repo_discussions",
"get_space_runtime",
"get_space_variables",
Expand All @@ -200,6 +201,7 @@
"list_repo_files",
"list_repo_likers",
"list_repo_refs",
"list_repo_tree",
"list_spaces",
"merge_pull_request",
"model_info",
Expand Down Expand Up @@ -519,6 +521,7 @@ def __dir__():
get_full_repo_name, # noqa: F401
get_inference_endpoint, # noqa: F401
get_model_tags, # noqa: F401
get_paths_info, # noqa: F401
get_repo_discussions, # noqa: F401
get_space_runtime, # noqa: F401
get_space_variables, # noqa: F401
Expand All @@ -534,6 +537,7 @@ def __dir__():
list_repo_files, # noqa: F401
list_repo_likers, # noqa: F401
list_repo_refs, # noqa: F401
list_repo_tree, # noqa: F401
list_spaces, # noqa: F401
merge_pull_request, # noqa: F401
model_info, # noqa: F401
Expand Down
Loading

0 comments on commit 7297957

Please sign in to comment.