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

Root methods instead of HfApi #388

Merged
merged 5 commits into from Oct 6, 2021
Merged

Root methods instead of HfApi #388

merged 5 commits into from Oct 6, 2021

Conversation

LysandreJik
Copy link
Member

This PR offers methods as root methods instead of leveraging the HfApi. Since the HfApi is essentially stateless in most use-cases, there is essentially no need to add an additional layer between the user and what they want to do.

This offers repository management methods at the root of huggingface_hub.

I've updated the docs alongside it, @stevhliu I should not have forgotten anything unless I'm mistaken.

This is fully backward compatible.

@julien-c
Copy link
Member

julien-c commented Oct 6, 2021

i think this makes sense

@LysandreJik LysandreJik marked this pull request as ready for review October 6, 2021 15:55
Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating, looks great to me!

docs/hub/how-to-upstream.md Outdated Show resolved Hide resolved
docs/hub/how-to-upstream.md Outdated Show resolved Hide resolved
Copy link
Contributor

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The resulting API is so much nicer 😍

LysandreJik and others added 2 commits October 6, 2021 15:22
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Copy link
Member

@osanseviero osanseviero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR! This goes in the right direction, things are much cleaner

@LysandreJik LysandreJik merged commit f5c8b25 into main Oct 6, 2021
@LysandreJik LysandreJik deleted the api-change-proposal branch October 6, 2021 20:03
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.

None yet

5 participants