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 dependency huggingface_hub to v0.28.1 #48

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

red-hat-konflux[bot]
Copy link
Contributor

@red-hat-konflux red-hat-konflux bot commented Jan 11, 2025

This PR contains the following updates:

Package Type Update Change
huggingface_hub project.dependencies minor ==0.27.0 -> ==0.28.1

Release Notes

huggingface/huggingface_hub (huggingface_hub)

v0.28.1: : FIX path in HF_ENDPOINT discarded

Compare Source

Release 0.28.0 introduced a bug making it impossible to set a HF_ENDPOINT env variable with a value with a subpath. This has been fixed in https://github.com/huggingface/huggingface_hub/pull/2807.

Full Changelog: huggingface/huggingface_hub@v0.28.0...v0.28.1

v0.28.0: [v0.28.0]: Third-party Inference Providers on the Hub & multiple quality of life improvements and bug fixes

Compare Source

⚡️Unified Inference Across Multiple Inference Providers

Screenshot 2025-01-28 at 12 05 42

The InferenceClient now supports third-party providers, offering a unified interface to run inference across multiple services while leveraging models from the Hugging Face Hub. This update enables developers to:

  • 🌐 Switch providers seamlessly - Transition between inference providers with a single interface.
  • 🔗 Unified model IDs - Always reference Hugging Face Hub model IDs, even when using external providers.
  • 🔑 Simplified billing and access management - You can use your Hugging Face Token for routing to third-party providers (billed through your HF account).

A list of supported third-party providers can be found here.

Example of text-to-image inference with Replicate:

>>> from huggingface_hub import InferenceClient

>>> replicate_client = InferenceClient(
...    provider="replicate",
...    api_key="my_replicate_api_key", # Using your personal Replicate key
)
>>> image = replicate_client.text_to_image(
...    "A cyberpunk cat hacking neural networks",
...    model="black-forest-labs/FLUX.1-schnell"
)
>>> image.save("cybercat.png")

Another example of chat completion with Together AI:

>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient(
...     provider="together",  # Use Together AI provider
...     api_key="<together_api_key>",  # Pass your Together API key directly
... )
>>> client.chat_completion(
...     model="deepseek-ai/DeepSeek-R1",
...     messages=[{"role": "user", "content": "How many r's are there in strawberry?"}],
... )

When using external providers, you can choose between two access modes: either use the provider's native API key, as shown in the examples above, or route calls through Hugging Face infrastructure (billed to your HF account):

>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient(
...    provider="fal-ai",
...    token="hf_****"  # Your Hugging Face token
)

⚠️ Parameters availability may vary between providers - check provider documentation.
🔜 New providers/models/tasks will be added iteratively in the future.
👉 You can find a list of supported tasks per provider and more details here.

✨ HfApi

The following change aligns the client with server-side updates by adding new repositories properties: usedStorage and resourceGroup.

[HfApi] update list of repository properties following server side updates by @​hanouticelina in #​2728

Extends empty commit prevention to file copy operations, preserving clean version histories when no changes are made.

[HfApi] prevent empty commits when copying files by @​hanouticelina in #​2730

🌐 📚 Documentation

Thanks to @​WizKnight, the hindi translation is much better!

Improved Hindi Translation in Documentation📝 by @​WizKnight in #​2697

💔 Breaking changes

The like endpoint has been removed to prevent misuse. You can still remove existing likes using the unlikeendpoint.

[HfApi] remove like endpoint by @​hanouticelina in #​2739

🛠️ Small fixes and maintenance

😌 QoL improvements
🐛 Bug and typo fixes
🏗️ internal

v0.27.1: [v0.27.1]: Fix typing.get_type_hints call on a ModelHubMixin

Compare Source

Full Changelog: huggingface/huggingface_hub@v0.27.0...v0.27.1

See #​2729 for more details.


Configuration

📅 Schedule: Branch creation - "after 5am on saturday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

To execute skipped test pipelines write comment /ok-to-test.

This PR has been generated by MintMaker (powered by Renovate Bot).

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
@red-hat-konflux red-hat-konflux bot force-pushed the konflux/mintmaker/main/huggingface_hub-0.x branch from 9c111cd to 60def0b Compare February 1, 2025 20:16
@red-hat-konflux red-hat-konflux bot changed the title Update dependency huggingface_hub to v0.27.1 Update dependency huggingface_hub to v0.28.1 Feb 1, 2025
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.

0 participants