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

🐛 Unable to call "huggingface_hub" > deprecation.py:131: FutureWarning: 'InferenceApi #580

Closed
adriens opened this issue Jan 13, 2024 · 13 comments
Labels
bug Something isn't working

Comments

@adriens
Copy link
Contributor

adriens commented Jan 13, 2024

❔ About

I'm trying to add a demo on top of huggingface mode with the following code:

%%ai huggingface_hub:TinyLlama/TinyLlama-1.1B-Chat-v1.0
Write a poem about rust language

... but I'm getting the following warning message:

/opt/conda/lib/python3.10/site-packages/huggingface_hub/utils/_deprecation.py:131:
FutureWarning: 'InferenceApi' (from 'huggingface_hub.inference_api') is deprecated
and will be removed from version '1.0'. `InferenceApi` client is deprecated in favor of
the more feature-complete `InferenceClient`.
Check out this guide to learn how to convert your script to use it: 
https://huggingface.co/docs/huggingface_hub/guides/inference#legacy-inferenceapi-client.
  warnings.warn(warning_message, FutureWarning)

without any answer.

image

🎯 Expected vs. current behavior

👉 I would expect to get the answer from HF, but got an empty answer:

image

ℹ️ Runtime

  • Kaggle
  • Worls well with openai/chatgpt
@adriens adriens added the bug Something isn't working label Jan 13, 2024
Copy link

welcome bot commented Jan 13, 2024

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@krassowski
Copy link
Member

@adriens can you try with the latest v2.16.0? #784 migrated to the new API.

@srdas
Copy link
Collaborator

srdas commented May 22, 2024

@adriens @krassowski I tried it with the latest release. The problem seems to be with the hosted model on huggingface.
If I use another model (mistral) it works fine but not with TinyLlama as shown here:
image
This seems to be a response error on the HF side. So to cross check I went to the model page and ran the model in the UI and we get this error confirming that this model cannot be used as shown below
image
I usually find it's best with HF to try the model out on the model page as some of the models have also become unresponsive. Hope this helps.

@adriens
Copy link
Contributor Author

adriens commented May 22, 2024

I'm giving it a try ⚡

@adriens
Copy link
Contributor Author

adriens commented May 22, 2024

image

🤞

@adriens
Copy link
Contributor Author

adriens commented May 22, 2024

image

@adriens
Copy link
Contributor Author

adriens commented May 22, 2024

So with the following code :

%%ai huggingface_hub:mistralai/Mistral-7B-v0.1
Write a poem about rust language

After many seconds, I get the following error:

image

image

@adriens
Copy link
Contributor Author

adriens commented May 22, 2024

🥳
image

@adriens
Copy link
Contributor Author

adriens commented May 22, 2024

I'll publish the update and tweet about it ⚡
Great job guys 🙏 😗

@adriens
Copy link
Contributor Author

adriens commented May 22, 2024

But now I'm facing a regression on chatgpt

image

@adriens
Copy link
Contributor Author

adriens commented May 25, 2024

@adriens
Copy link
Contributor Author

adriens commented May 25, 2024

Tweet

image

@adriens adriens closed this as completed May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants