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

[inference] Partial revert of #1199, cleaner implem #1201

Merged
merged 3 commits into from
Feb 14, 2025

Conversation

julien-c
Copy link
Member

No description provided.

@@ -243,6 +243,10 @@ function makeUrl(params: {
}
default: {
const baseUrl = HF_HUB_INFERENCE_PROXY_TEMPLATE.replaceAll("{{PROVIDER}}", "hf-inference");
if (params.taskHint && ["feature-extraction", "sentence-similarity"].includes(params.taskHint)) {
/// when deployed on hf-inference, those two tasks are automatically compatible with one another.
return `${baseUrl}/pipeline/${params.taskHint}/${params.model}`;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be cleaner if it was /{model}/pipeline/{task}, probably (also simpler to route)

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.

Let's do that 😄 I made the same PR for huggingface_hub: huggingface/huggingface_hub#2861

@julien-c julien-c merged commit 5a394d2 into main Feb 14, 2025
5 checks passed
@julien-c julien-c deleted the sentence-similarity-and-feature-extraction branch February 14, 2025 09:35
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.

3 participants