-
Notifications
You must be signed in to change notification settings - Fork 683
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
Conversation
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice addition :)
src/huggingface_hub/hf_api.py
Outdated
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"`). |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updating now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated here: 54572d5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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*): |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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?)
There was a problem hiding this comment.
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
…uggingface_hub into vb/upd-inference-endpoints
CI failure is unrelated, merging it now (code quality is ✔️ though) |
cache_http_responses (`bool`, *optional*): | ||
Whether to cache HTTP responses from the Inference Endpoint. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, convenient, thanks!
ref: https://huggingface.slack.com/archives/C016D661PAN/p1744900723918749?thread_ts=1742997838.592509&cid=C016D661PAN