Skip to content

Conversation

@Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Nov 14, 2024

Given the size of the PR and the internal changes, I think it's best to review the changes commit per commit.

This PR:

  • improves snippets for document-question-answering (0288149)
  • improves snippets for automated-speech-recognition (060cd21)
  • adds snippets for image-to-image (6234469)
  • fixes some base64 imports (0907d8f)

I added tests for all the above.
I did not add InferenceClient snippets for all tasks as it's time-consuming. I only added tasks based on the trending models listed on huggingface.co/models. We might add more tasks in the future but that's less a priority.

Also includes some cleaning:

  • remove useless "export ..." from python snippets module (6d29991)
  • order snippet definitions alphabetically for easier retrieval (0900c99)

EDIT (05/03/2025): rebased from main + adapted to take providers into account. The scope of this PR is more or less the same as before.

@mishig25
Copy link
Collaborator

mishig25 commented Nov 25, 2024

#1046 is merged. What does it mean for this PR?

@Wauplin
Copy link
Contributor Author

Wauplin commented Nov 25, 2024

@mishig25 I took care of merging + switching test to the "new" system + fixing a snippet template. Should be all good for review now :)

Note that I have added tests only for the Python snippets since I only touched these (JS/curl might be good but prefer to do them in a later PR if relevant)

@coyotte508
Copy link
Member

coyotte508 commented Mar 3, 2025

What's the status on this?

Copy link
Member

@coyotte508 coyotte508 left a comment

Choose a reason for hiding this comment

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

🙈

@Wauplin
Copy link
Contributor Author

Wauplin commented Mar 5, 2025

Thanks for the ping @coyotte508! PR is still relevant but I had to adapt some stuff to comply with new API + providers. Scope remains more or less the same.

@julien-c @gary149 @SBrandeis @hanouticelina can you have a look at it and especially the generated snippets under ./packages/tasks-gen/snippets-fixtures/? Thanks!

Copy link
Contributor

@hanouticelina hanouticelina left a comment

Choose a reason for hiding this comment

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

the generated snippets look good to me 👍 left one small comment though

@Wauplin
Copy link
Contributor Author

Wauplin commented Mar 5, 2025

Merging as already approved + I need it for another PR I'm preparing.

If you see anything that must be changed in these snippets, just comment here and I'll handle them in a separate PR.

@Wauplin Wauplin merged commit b32dcb6 into main Mar 5, 2025
5 checks passed
@Wauplin Wauplin deleted the more-python-inference-snippets branch March 5, 2025 16:17
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.

6 participants