-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add repository abstraction Before this change, loading models was done with a bunch of standalone functions for Hugging Face Hub and fsspec. These functions had a lot of overlap and adding yet another storage backend would require duplicating the same functions again and littering them through the code base. This change does away with all the standalone functions and introduces the `Repository` API. This base class requires implementations to define a few basic operations. More complex operations are implemented in terms of these basic operations and generic across repository types. Initially there are two repository types, `HfHubRepository` and `FsspecRepository`. There are also two wrappers for `Repository` instances that implement model operations (`ModelRepository`) and tokenizer operations (`TokenizerRepository`). * Fixes Co-authored-by: Madeesh Kannan <[email protected]> * More specific catch Co-authored-by: Madeesh Kannan <[email protected]> * Address PR comments * Repository example, some fixes * Add missing elipsis --------- Co-authored-by: Madeesh Kannan <[email protected]>
- Loading branch information
Showing
28 changed files
with
1,013 additions
and
1,152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.