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

Fix generate script after new snippets #1490

Merged
merged 9 commits into from
Nov 18, 2024
Merged

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Nov 15, 2024

Happy to close if duplicate work

@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.

@hanouticelina
Copy link
Contributor

(unrelated) there seems to be an issue with "conversational" image-text-to-text snippet where requests is imported and API_URL and headers are defined but not used. I double checked and we are correctly sending the "conversational" tag to getPythonInferenceSnippet. Not sure where this issue comes from 🤔
Screenshot 2024-11-15 at 16 33 48

@hanouticelina
Copy link
Contributor

(unrelated) there seems to be an issue with "conversational" image-text-to-text snippet where requests is imported and API_URL and headers are defined but not used. I double checked and we are correctly sending the "conversational" tag to getPythonInferenceSnippet. Not sure where this issue comes from 🤔 Screenshot 2024-11-15 at 16 33 48

For non-conversational image-text-to-text, we're using the conversational image-text-to-text snippet, this is why we have this weird combination. I will merge this PR but we should fix this by adding image-text-to-text task inputs here to have a proper requests-based snippet when the VLM is not conversational. Note: all warm models in the Inference API are currently conversational VLMs.

@Wauplin
Copy link
Contributor Author

Wauplin commented Nov 18, 2024

(unrelated) there seems to be an issue with "conversational" image-text-to-text snippet where requests is imported and API_URL and headers are defined but not used. I double checked and we are correctly sending the "conversational" tag to getPythonInferenceSnippet. Not sure where this issue comes from 🤔

I think this was an issue in huggingface/tasks that has been fixed since then. We'll have to make sure the automated PR always updates the dependencies as well to get the latest changes (not the case for now?). In any case, snippets are good on the Hub which is the most important https://huggingface.co/meta-llama/Llama-3.2-11B-Vision-Instruct?inference_api=true

Copy link
Contributor Author

@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.

Thanks for the changes! Left a nit but otherwise looks good to merge :)

(I cannot approve my own PR even though the code is not mine anymore ^^)

scripts/api-inference/scripts/generate.ts Outdated Show resolved Hide resolved
@@ -9,8 +9,8 @@ importers:
.:
dependencies:
'@huggingface/tasks':
specifier: ^0.11.11
version: 0.11.11
specifier: ^0.12.15
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Latest is 0.13.2 (https://www.npmjs.com/package/@huggingface/tasks) and should fix the import issue. (can be done in a later PR, typically the automated one)

Copy link
Contributor

Choose a reason for hiding this comment

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

indeed! i will add that in #1480

@hanouticelina hanouticelina merged commit 135c53e into main Nov 18, 2024
2 checks passed
@hanouticelina hanouticelina deleted the fix-after-new-snippets branch November 18, 2024 09:59
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