Skip to content

Conversation

@amyeroberts
Copy link
Contributor

What does this PR do?

The PR #21106 introduced failures in some doctests:

  • src/transformers/models/deit/modeling_tf_deit.py::transformers.models.deit.modeling_tf_deit.TFDeiTForImageClassificationWithTeacher.call
  • src/transformers/models/resnet/modeling_tf_resnet.py::transformers.models.resnet.modeling_tf_resnet.TFResNetModel.call
  • src/transformers/models/segformer/modeling_tf_segformer.py::transformers.models.segformer.modeling_tf_segformer.TFSegformerForImageClassification.call
  • src/transformers/models/vit/modeling_tf_vit.py::transformers.models.vit.modeling_tf_vit.TFViTModel.call

This was due to processor_class no longer being passed to add_code_sample_docstrings e.g. the changes to modeling_tf_deit.py.

Whilst processor_class could be removed for the PyTorch models doctests, {processor_class} hadn't been removed for the equivalent TensorFlow doctest templates. This updates the test templates to match the equivalent PyTorch ones and resolve failing tests.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jan 23, 2023

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

@amyeroberts
Copy link
Contributor Author

Closed as changes are a subset of changes introduced in #21225

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.

2 participants