-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Align signature of create/delete_repo with latest hfh #5064
Conversation
The documentation is not available anymore as the PR was closed or merged. |
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
@@ -88,15 +83,16 @@ def delete_repo( | |||
`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_repo
with the current one in hfh, by removing deprecatedname
andorganization
, and usingrepo_id
instead.Related to:
CC: @lhoestq