huggingface / huggingface_hub

The official Python client for the Huggingface Hub.
https://huggingface.co/docs/huggingface_hub
Apache License 2.0
1.82k stars 470 forks source link

Replace Deprectated `Repository` with `HfApi` #2351

Closed cochaviz closed 1 week ago

cochaviz commented 1 week ago

I got various errors uploading my models to huggingface_hub (didn't include this as a bug report as even the proposed commit that should have fixed my issue worked in my particular context), all related to the Repository object. This class seems to be deprecated.

The use of the use of Repository should be replaced by using the HfApi object (https://huggingface.co/docs/huggingface_hub/concepts/git_vs_http).

As mentioned before, there should have been a fix in the huggingface_hub repository (this fix is no t yet published to pipy: https://github.com/huggingface/huggingface_hub/pull/2320.

Already fixed it, PR is on the way 😄!

cochaviz commented 1 week ago

Oops, wrong repo...