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

FIX don't raise if name/organizaiton are passed postionally #822

Merged
merged 2 commits into from
Apr 6, 2022
Merged

FIX don't raise if name/organizaiton are passed postionally #822

merged 2 commits into from
Apr 6, 2022

Conversation

adrinjalali
Copy link
Contributor

Fixes #821

If user passes name as a positional argument and pass organization as well, we fail, whereas we should raise a FutureWarning.

cc @LysandreJik @osanseviero

This needs to be backported to 0.5.1 for a patch release.

Copy link
Member

@lhoestq lhoestq left a comment

Choose a reason for hiding this comment

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

Thanks ! Just tested with datasets and it fixes push_to_hub :)

src/huggingface_hub/hf_api.py Outdated Show resolved Hide resolved
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Apr 6, 2022

The documentation is not available anymore as the PR was closed or merged.

Co-authored-by: Quentin Lhoest <42851186+lhoestq@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! 👍

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @adrinjalali

@LysandreJik LysandreJik merged commit d7eb62e into huggingface:main Apr 6, 2022
LysandreJik pushed a commit that referenced this pull request Apr 6, 2022
* FIX don't raise if name/organizaiton are passed postionally

* Fix typo in comment

Co-authored-by: Quentin Lhoest <42851186+lhoestq@users.noreply.github.com>

Co-authored-by: Quentin Lhoest <42851186+lhoestq@users.noreply.github.com>
@adrinjalali adrinjalali deleted the hotfix/repo_id branch April 6, 2022 12:29
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.

HfApi.create_repo fails in 0.5 if the org name is passed in repo_id and organization arguments
5 participants