-
Notifications
You must be signed in to change notification settings - Fork 3k
Align signature of create/delete_repo with latest hfh #5064
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
Align signature of create/delete_repo with latest hfh #5064
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
lhoestq
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small bug:
src/datasets/utils/_hf_hub_fixes.py
Outdated
| return hf_api.create_repo( | ||
| name=name, | ||
| organization=organization, | ||
| organization=organization or None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| organization=organization or None, | |
| organization=organization, |
src/datasets/utils/_hf_hub_fixes.py
Outdated
| `str`: URL to the newly created repo. | ||
| """ | ||
| if version.parse(huggingface_hub.__version__) < version.parse("0.5.0"): | ||
| name, *organization = repo_id.split("/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
| name, *organization = repo_id.split("/") | |
| organization, name = repo_id.split("/") if "/" in repo_id else None, repo_id |
This PR aligns the signature of
create_repo/delete_repowith the current one in hfh, by removing deprecatednameandorganization, and usingrepo_idinstead.Related to:
CC: @lhoestq