Skip to content

add route payload to deploy Inference Endpoints #3013

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

Merged
merged 9 commits into from
Apr 23, 2025

Conversation

@HuggingFaceDocBuilderDev

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.

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.

nice addition :)

domain (`str`, *optional*):
The custom domain for the Inference Endpoint (e.g. `"my-new-domain.cool-website.woof"`).
path (`str`, *optional*):
The custom path for the Inference Endpoint, should start with a `/` (e.g. `"/models/google-bert/bert-base-uncased"`).
Copy link
Contributor

Choose a reason for hiding this comment

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

What does it means exactly? Is it that the endpoint should be served under endpoints-(...)-url.co/models/google-bert/bert-base-uncased or is it that the URL endpoints-(...)-url.co/ points to the /models/google-bert/bert-base-uncased path of the docker image? (worth some clarification in the docstring IMO)

Copy link
Member Author

Choose a reason for hiding this comment

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

IIRC @oOraph mentioned this is applicable for anyone with a custom domain registered as well, so I'd consider this to be generic.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, worth having the parameter supported in huggingface_hub! Just wanted to be sure what it meant exactly (The custom path for the Inference Endpoint is not explicit enough IMO)

Copy link
Member Author

Choose a reason for hiding this comment

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

updating now

Copy link
Member Author

Choose a reason for hiding this comment

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

updated here: 54572d5

Copy link
Member

Choose a reason for hiding this comment

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

i think it's when you want to expose the resulting endpoint's inference route under a custom path but you can check with @oOraph and @XciD

The custom domain for the Inference Endpoint (e.g. `"my-new-domain.cool-website.woof"`).
path (`str`, *optional*):
The custom path for the Inference Endpoint, should start with a `/` (e.g. `"/models/google-bert/bert-base-uncased"`).
cache_http_responses (`bool`, *optional*):
Copy link
Contributor

Choose a reason for hiding this comment

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

(link this private thread to avoid forgetting about it - if this attribute is HF-only, let's remove it)

cache_http_responses (`bool`, *optional*):
Whether to cache HTTP responses from the Inference Endpoint. Defaults to `False`.
tags (`List[str]`, *optional*):
A list of tags to associate with the Inference Endpoint.
Copy link
Contributor

Choose a reason for hiding this comment

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

Out of curiosity, how do we play with tags once set? (e.g. can we list endpoints based on tags? or is it a UI change?)

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah! you can list all endpoints deployed with a certain specific tag

@Wauplin
Copy link
Contributor

Wauplin commented Apr 23, 2025

CI failure is unrelated, merging it now (code quality is ✔️ though)

@Wauplin Wauplin merged commit 34bb25d into main Apr 23, 2025
10 of 25 checks passed
@Wauplin Wauplin deleted the vb/upd-inference-endpoints branch April 23, 2025 12:31
Comment on lines +7944 to +7945
cache_http_responses (`bool`, *optional*):
Whether to cache HTTP responses from the Inference Endpoint.
Copy link
Member

Choose a reason for hiding this comment

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

So we're okay with keeping this?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes I think so in the end. It's also publicly documented here: https://api.endpoints.huggingface.cloud/#post-/v2/endpoint/-namespace-. This method is already not much used so if it can make HF's people life easier, let's go for it

Copy link
Member

Choose a reason for hiding this comment

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

Perfect, convenient, thanks!

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.

7 participants