-
Notifications
You must be signed in to change notification settings - Fork 18
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
Make a new API in huggingface_hub.hf_api
for recommended deployment config
#100
Comments
Hey there, thanks for the ping :) For better context, what call is made to this API and what does it return? If I
|
Just FYI, if you want to use from huggingface_hub import constants
from huggingface_hub.utils import build_hf_headers, get_session, hf_raise_for_status
url = f"{constants.ENDPOINT}/api/integrations/tgi/v1/provider/gcp/recommend"
response = get_session().get(url, headers=build_hf_headers())
hf_raise_for_status(response)
payload = response.json() This is very similar to |
Hi here @Wauplin thanks for the prompt response and the suggestion! 🤗
Here's an example API call: curl https://huggingface.co/api/integrations/tgi/v1/provider/gcp/recommend?model_id=google/gemma-7b-it&gpu_memory=80&num_gpus=2 Hope that helps, and @weigary feel free to add any other detail if needed! |
thanks! We will try it out! |
Hi,
Right now we have a http call to
https://huggingface.co/api/integrations/tgi/v1/provider/gcp/recommend"
to get the recommended deployment configs. We need to make a http request and parse the http response to json. It would be better if we can have a python API, for example in thehuggingface_hub.hf_api
for this purpose.Is it a reasonable feature request?
The text was updated successfully, but these errors were encountered: