Skip to content

Ignore unsupported pipelines for transformers #703

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

Merged
merged 1 commit into from
May 22, 2024
Merged

Conversation

osanseviero
Copy link
Contributor

If a model has a type without a corresponding pipeline in transformers, we don't show the pipeline snippet but we still show the AutoModel one. This is useful for example for sentence-similarity models

Screenshot from 2024-05-22 18-35-06
Screenshot from 2024-05-22 18-34-43

https://huggingface.slack.com/archives/C02EMARJ65P/p1716294199591799

@@ -438,7 +439,7 @@ export const transformers = (model: ModelData): string[] => {
].join("\n");
}

if (model.pipeline_tag) {
if (model.pipeline_tag && LIBRARY_TASK_MAPPING.transformers?.includes(model.pipeline_tag)) {
Copy link
Member

Choose a reason for hiding this comment

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

This looks very sensible 👍

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!

@osanseviero osanseviero merged commit 4cc1500 into main May 22, 2024
4 checks passed
@osanseviero osanseviero deleted the ignore-invalid branch May 22, 2024 19:43
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