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

Update repository.md #2010

Merged
merged 2 commits into from
Feb 6, 2024
Merged

Update repository.md #2010

merged 2 commits into from
Feb 6, 2024

Conversation

xmichaelmason
Copy link
Contributor

per the docs here:

https://huggingface.co/docs/huggingface_hub/v0.20.3/en/package_reference/hf_api#huggingface_hub.HfApi.create_branch

create_branch() no longer accepts a "tag" parameter.

Produced error:

TypeError Traceback (most recent call last)
Cell In[21], line 1
----> 1 create_branch(
2 "mylesdyson/speecht5-tts-demo",
3 repo_type="dataset",
4 revision="v0.1-release",
5 tag="v0.1.1",
6 tag_message="Bump release version.",
7 token=HF_TOKEN
8 )

File ~/.local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py:118, in validate_hf_hub_args.._inner_fn(*args, **kwargs)
115 if check_use_auth_token:
116 kwargs = smoothly_deprecate_use_auth_token(fn_name=fn.name, has_token=has_token, kwargs=kwargs)
--> 118 return fn(*args, **kwargs)

TypeError: HfApi.create_branch() got an unexpected keyword argument 'tag'

per the docs here:

https://huggingface.co/docs/huggingface_hub/v0.20.3/en/package_reference/hf_api#huggingface_hub.HfApi.create_branch


create_branch() no longer accepts a "tag" parameter.



Produced error:

TypeError                                 Traceback (most recent call last)
Cell In[21], line 1
----> 1 create_branch(
      2     "mylesdyson/speecht5-tts-demo",
      3     repo_type="dataset",
      4     revision="v0.1-release",
      5     tag="v0.1.1",
      6     tag_message="Bump release version.",
      7     token=HF_TOKEN
      8 )

File ~/.local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py:118, in validate_hf_hub_args.<locals>._inner_fn(*args, **kwargs)
    115 if check_use_auth_token:
    116     kwargs = smoothly_deprecate_use_auth_token(fn_name=fn.__name__, has_token=has_token, kwargs=kwargs)
--> 118 return fn(*args, **kwargs)

TypeError: HfApi.create_branch() got an unexpected keyword argument 'tag'
Copy link
Contributor

@Wauplin Wauplin 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 noticing the error and opening a PR to fix it @xmichaelmason!
I think the correct fix should be to use create_tag here instead of removing the tag parameter. Will apply the change and merge this. Thanks again!

docs/source/en/guides/repository.md Outdated Show resolved Hide resolved
@Wauplin Wauplin merged commit 00b1b18 into huggingface:main Feb 6, 2024
2 checks passed
This was referenced Feb 6, 2024
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

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

3 participants