Skip to content

Conversation

@albertvillanova
Copy link
Member

This PR aligns the signature of create_repo/delete_repo with the current one in hfh, by removing deprecated name and organization, and using repo_id instead.

Related to:

CC: @lhoestq

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 4, 2022

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

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.

small bug:

return hf_api.create_repo(
name=name,
organization=organization,
organization=organization or None,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
organization=organization or None,
organization=organization,

`str`: URL to the newly created repo.
"""
if version.parse(huggingface_hub.__version__) < version.parse("0.5.0"):
name, *organization = repo_id.split("/")
Copy link
Member

Choose a reason for hiding this comment

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

same here

Suggested change
name, *organization = repo_id.split("/")
organization, name = repo_id.split("/") if "/" in repo_id else None, repo_id

@albertvillanova albertvillanova merged commit 0417fd5 into huggingface:main Oct 7, 2022
@albertvillanova albertvillanova deleted the align-hfh-repo_id branch October 7, 2022 16:59
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.

3 participants