Unverified Commit 23fab60b authored by Ankur Goyal's avatar Ankur Goyal Committed by GitHub
Browse files

Pin revision for LayoutLMForQuestionAnswering and TFLayoutLMForQuestionAnswering tests (#18854)



* Pin revision for tests

* Fixup

* Update revision in models

* Shorten revisions
Co-authored-by: default avatarAnkur Goyal <ankur@impira.com>
parent ddb69e5a
...@@ -1285,7 +1285,7 @@ class LayoutLMForQuestionAnswering(LayoutLMPreTrainedModel): ...@@ -1285,7 +1285,7 @@ class LayoutLMForQuestionAnswering(LayoutLMPreTrainedModel):
>>> import torch >>> import torch
>>> tokenizer = AutoTokenizer.from_pretrained("impira/layoutlm-document-qa", add_prefix_space=True) >>> tokenizer = AutoTokenizer.from_pretrained("impira/layoutlm-document-qa", add_prefix_space=True)
>>> model = LayoutLMForQuestionAnswering.from_pretrained("impira/layoutlm-document-qa") >>> model = LayoutLMForQuestionAnswering.from_pretrained("impira/layoutlm-document-qa", revision="1e3ebac")
>>> dataset = load_dataset("nielsr/funsd", split="train") >>> dataset = load_dataset("nielsr/funsd", split="train")
>>> example = dataset[0] >>> example = dataset[0]
......
...@@ -1448,7 +1448,7 @@ class TFLayoutLMForQuestionAnswering(TFLayoutLMPreTrainedModel, TFQuestionAnswer ...@@ -1448,7 +1448,7 @@ class TFLayoutLMForQuestionAnswering(TFLayoutLMPreTrainedModel, TFQuestionAnswer
>>> from datasets import load_dataset >>> from datasets import load_dataset
>>> tokenizer = AutoTokenizer.from_pretrained("impira/layoutlm-document-qa", add_prefix_space=True) >>> tokenizer = AutoTokenizer.from_pretrained("impira/layoutlm-document-qa", add_prefix_space=True)
>>> model = TFLayoutLMForQuestionAnswering.from_pretrained("impira/layoutlm-document-qa") >>> model = TFLayoutLMForQuestionAnswering.from_pretrained("impira/layoutlm-document-qa", revision="1e3ebac")
>>> dataset = load_dataset("nielsr/funsd", split="train") >>> dataset = load_dataset("nielsr/funsd", split="train")
>>> example = dataset[0] >>> example = dataset[0]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment