Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add repository abstraction #331

Merged
merged 6 commits into from Sep 26, 2023
Merged

Commits on Sep 26, 2023

  1. 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`).
    danieldk committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    3ea915d View commit details
    Browse the repository at this point in the history
  2. Fixes

    Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>
    danieldk and shadeMe committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    35bfd2d View commit details
    Browse the repository at this point in the history
  3. More specific catch

    Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>
    danieldk and shadeMe committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    eceeda5 View commit details
    Browse the repository at this point in the history
  4. Address PR comments

    danieldk committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    e796b6e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6e0dcfa View commit details
    Browse the repository at this point in the history
  6. Add missing elipsis

    danieldk committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    ef406e8 View commit details
    Browse the repository at this point in the history