Skip to content

Update forward signature test for vision models#27681

Merged
ydshieh merged 2 commits into
huggingface:mainfrom
NielsRogge:fix_forward_signature_bis
Nov 27, 2023
Merged

Update forward signature test for vision models#27681
ydshieh merged 2 commits into
huggingface:mainfrom
NielsRogge:fix_forward_signature_bis

Conversation

@NielsRogge

Copy link
Copy Markdown
Collaborator

What does this PR do?

This PR makes sure that vision-only models don't need to overwrite test_forward_signature. Instead, model.main_input_name is leveraged.

@HuggingFaceDocBuilderDev

HuggingFaceDocBuilderDev commented Nov 23, 2023

Copy link
Copy Markdown

The documentation is not available anymore as the PR was closed or merged.

@ArthurZucker ArthurZucker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me! Let's just make sure all NLP models have this properly set, but nice cleanup!

@ydshieh ydshieh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you. Nice job!

@ydshieh

ydshieh commented Nov 27, 2023

Copy link
Copy Markdown
Collaborator

main_input_name is defined in PreTrainedModel (and the corresponding TF/Flax counterpart), so

all (NLP) models have this properly set

is True

@ydshieh
ydshieh merged commit 59499bb into huggingface:main Nov 27, 2023
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.

4 participants