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 method to push adapters to HF Model Hub #197

Merged
merged 3 commits into from
Jul 6, 2021

Conversation

calpt
Copy link
Member

@calpt calpt commented Jun 28, 2021

Follow-up to #162.

Similar to push_to_hub() in transformers, this PR adds a new method push_adapter_to_hub() that allows pushing a loaded adapter by name, e.g.:

model.push_adapter_to_hub(
    "my-awesome-adapter",  # repo name
    "awesome_adapter",  # adapter name
    adapterhub_tag="sentiment/imdb",
    datasets_tag="imdb"
)

One of the two args adapterhub_tag and datasets_tag is required, so we can automatically pull adapters from huggingface.co to AdapterHub.ml with correct categorization.

Also added a new doc page (adapter_docs/huggingface_hub.md) for describing the HF Model Hub integration.

cc @osanseviero just fyi :)

@calpt calpt marked this pull request as ready for review June 28, 2021 16:35
@osanseviero
Copy link

@julien-c @LysandreJik Look this great stuff 🤩

@LysandreJik
Copy link

That's great @calpt!! Love the source=hf!

And very nice that you're offering the possibility for users to have a local directory to sync, rather than the temporary directory which would mean re-cloning every time!

@calpt
Copy link
Member Author

calpt commented Jun 29, 2021

Thanks for the feedback @osanseviero @LysandreJik !

@calpt calpt requested a review from hSterz June 29, 2021 15:47
@calpt calpt merged commit 661155e into adapter-hub:develop Jul 6, 2021
@calpt calpt deleted the dev/push_to_hub branch July 6, 2021 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants