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

Replace deprecated use of 'Repository' when pushing to hub with HfApi #462

Closed
wants to merge 9 commits into from

Conversation

cochaviz
Copy link

@cochaviz cochaviz commented Jun 22, 2024

Remove deprecated use of 'Repository' when pushing to huggingface hub

Description

As mentioned above, use of the Repository class is deprecated: https://hu…ggingface.co/docs/huggingface_hub/concepts/git_vs_http.

Motivation and Context

  • I have raised an issue to propose this change (required for new features and bug fixes)

Closes #463 🥳

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (update in the documentation)

Checklist:

  • I've read the CONTRIBUTION guide (required)
  • I have updated the changelog accordingly (required).
  • My change requires a change to the documentation.
  • I have updated the tests accordingly (required for a bug fix or a new feature).
  • I have updated the documentation accordingly.
  • I have reformatted the code using make format (required)
  • I have checked the codestyle using make check-codestyle and make lint (required)
  • I have ensured make pytest and make type both pass. (required)

Note: we are using a maximum length of 127 characters per line

@araffin araffin changed the base branch from update/hf to master June 23, 2024 10:49
@araffin
Copy link
Member

araffin commented Jun 23, 2024

Hello,
thanks for the PR, could you rebase your PR from master instead of the update/hf branch?

@cochaviz
Copy link
Author

Hello, thanks for the PR, could you rebase your PR from master instead of the update/hf branch?

I just want to double-check whether what I'm doing now is also okay: I will cherry-pick the commits I made to the branch and add them to master. Should I then create a new PR that originates from master?

Sorry for the hassle, I haven't contributed much to open-source so I'm not incredibly familiar with all the conventions! 🥲 (I was following the huggingface course when I found this issue, and though hf stood for that... Now I realize it probably stands for hotfix 😅 )

@araffin
Copy link
Member

araffin commented Jun 25, 2024

I will cherry-pick the commits I made to the branch and add them to master. Should I then create a new PR that originates from master?

Almost. Start from master, create a new branch, cherry-pick the commits and then push (you could even force push to this branch).

EDIT: hf was for huggingface but this branch has been merged a while ago, I will delete it now.

qgallouedec added a commit that referenced this pull request Jul 23, 2024
@qgallouedec
Copy link
Collaborator

Closing in favour of #465

araffin added a commit that referenced this pull request Aug 6, 2024
* Commits from #462

* update ci

* `hf_hub_download` -> `snapshot_download`

* fix local dir; handle lfs for mp4

* rm line

---------

Co-authored-by: Quentin Gallouédec <quentin.gallouedec@huggingface.co>
Co-authored-by: Antonin RAFFIN <antonin.raffin@ensta.org>
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.

Replace Deprectated Repository with HfApi
4 participants