From ff8870350151091d3d8b2af4c1c0fa3ebcc1052a Mon Sep 17 00:00:00 2001 From: Yih-Dar <2521628+ydshieh@users.noreply.github.com> Date: Tue, 14 Mar 2023 10:13:16 +0100 Subject: [PATCH] Update 2 doctest expected values for torch 2.0.0 (#22148) update values Co-authored-by: ydshieh --- docs/source/en/pipeline_tutorial.mdx | 2 +- src/transformers/generation/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/en/pipeline_tutorial.mdx b/docs/source/en/pipeline_tutorial.mdx index 00dceeb4f24..873d497d3ef 100644 --- a/docs/source/en/pipeline_tutorial.mdx +++ b/docs/source/en/pipeline_tutorial.mdx @@ -247,7 +247,7 @@ For example, if you use this [invoice image](https://huggingface.co/spaces/impir ... image="https://huggingface.co/spaces/impira/docquery/resolve/2359223c1837a7587402bda0f2643382a6eefeab/invoice.png", ... question="What is the invoice number?", ... ) -[{'score': 0.42514941096305847, 'answer': 'us-001', 'start': 16, 'end': 16}] +[{'score': 0.42515, 'answer': 'us-001', 'start': 16, 'end': 16}] ``` diff --git a/src/transformers/generation/utils.py b/src/transformers/generation/utils.py index 7091b49e3ec..ad18644ee5c 100644 --- a/src/transformers/generation/utils.py +++ b/src/transformers/generation/utils.py @@ -2401,7 +2401,7 @@ class GenerationMixin: ... ) >>> tokenizer.batch_decode(outputs, skip_special_tokens=True) - ['Today is a beautiful day, and a wonderful day.\n\nI was lucky enough to meet the'] + ['Today is a beautiful day, and we must do everything possible to make it a day of celebration.'] ```""" # init values logits_processor = logits_processor if logits_processor is not None else LogitsProcessorList()