huggingface / huggingface_hub

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

ModelHubMixin: Fix attributes lost in inheritance #2305

Closed Wauplin closed 1 month ago

Wauplin commented 1 month ago

Fix https://github.com/huggingface/huggingface_hub/issues/2300.

Instead of recreating the MixinInfo object, we should complete its information as mentioned by @qubvel. Thanks for reporting this!

EDIT: made some minor edits to ModelCardData as well but mostly setting alphabetical order + adding license_name/license_link officially.

EDIT 2: deprecated languages in favor of language to be consistent with ModelCardData.

HuggingFaceDocBuilderDev commented 1 month ago

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.

qubvel commented 1 month ago

@Wauplin thanks for a quick response and fix!

Wauplin commented 1 month ago

EDIT: Ah, to be consistent with ModelCardData

Yes, and moreover to be consistent with the existing repos on the Hub (and typically to filter by language).

Thanks for the review :)