Skip to content

Conversation

@mishig25
Copy link
Collaborator

@mishig25 mishig25 commented Oct 30, 2024

Description

[Conversational snippet] Fix, refactor, & add tests

closes #1010

  1. Fixes an error https://github.com/huggingface/huggingface.js/pull/1003/files#r1824269481
  2. Redo https://github.com/huggingface/huggingface.js/pull/1003/files#r1824270922
  3. Add tests

@mishig25 mishig25 marked this pull request as draft October 30, 2024 15:38
"tabular-classification": inputsTabularPrediction,
"text-classification": inputsTextClassification,
"text-generation": inputsTextGeneration,
"image-text-to-text": inputsTextGeneration,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this fix was needed, which caused an error on the hub. slack context.

I've created tests files for snippets that test the snippets for both LLMs & VLMs

});

return opts.start + messagesStringified.join(opts.sep) + opts.end;
export function stringifyMessages(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

redo stringifyMessages function to be cleaner

@mishig25 mishig25 marked this pull request as ready for review October 31, 2024 11:04
@mishig25
Copy link
Collaborator Author

mishig25 commented Oct 31, 2024

@Wauplin @julien-c, this PR is ready to be reviewed

Copy link
Member

@julien-c julien-c left a comment

Choose a reason for hiding this comment

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

lgtm from a very very superficial glance, but i didn't look in detail so i'll let someone else review

Copy link
Member

@julien-c julien-c left a comment

Choose a reason for hiding this comment

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

lgtm from a very very superficial glance, but i didn't look in detail so i'll let someone else review

Copy link
Contributor

@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 @mishig25! Looks good, I think we can merge it + make a patch release. Glad we now have tests for the snippets 👍

@mishig25 mishig25 merged commit ea047d1 into main Nov 4, 2024
5 checks passed
@mishig25 mishig25 deleted the conversational_snippets_update branch November 4, 2024 15:23
Wauplin added a commit that referenced this pull request Nov 14, 2024
Supersedes #994.

This PR adds an `huggingface_hub` snippet for `text-to-image` inference
in Python. I added a test as done in
#1003.

Once this one is approved and merged, I'll move on with all other tasks
that the `InferenceClient` supports.

---------

Co-authored-by: Mishig <dmishig@gmail.com>
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.

wrong chat snippet for image-text-to-text task

5 participants