transformers/tests/pipelines
Ankur Goyal 2ef7742117
Add DocumentQuestionAnswering pipeline (#18414)
* [WIP] Skeleton of VisualQuestionAnweringPipeline extended to support LayoutLM-like models

* Fixup

* Use the full encoding

* Basic refactoring to DocumentQuestionAnsweringPipeline

* Cleanup

* Improve args, docs, and implement preprocessing

* Integrate OCR

* Refactor question_answering pipeline

* Use refactored QA code in the document qa pipeline

* Fix tests

* Some small cleanups

* Use a string type annotation for Image.Image

* Update encoding with image features

* Wire through the basic docs

* Handle invalid response

* Handle empty word_boxes properly

* Docstring fix

* Integrate Donut model

* Fixup

* Incorporate comments

* Address comments

* Initial incorporation of tests

* Address Comments

* Change assert to ValueError

* Comments

* Wrap `score` in float to make it JSON serializable

* Incorporate AutoModeLForDocumentQuestionAnswering changes

* Fixup

* Rename postprocess function

* Fix auto import

* Applying comments

* Improve docs

* Remove extra assets and add copyright

* Address comments

Co-authored-by: Ankur Goyal <ankur@impira.com>
2022-09-07 13:38:49 -04:00
..
__init__.py [Test refactor 1/5] Per-folder tests reorganization (#15725) 2022-02-23 15:46:28 -05:00
test_pipelines_audio_classification.py [Test refactor 1/5] Per-folder tests reorganization (#15725) 2022-02-23 15:46:28 -05:00
test_pipelines_automatic_speech_recognition.py Fixing issue where generic model types wouldn't load properly with the pipeline (#18392) 2022-08-05 08:45:07 +02:00
test_pipelines_common.py Further reduce the number of alls to head for cached objects (#18871) 2022-09-06 12:34:37 -04:00
test_pipelines_conversational.py [Test refactor 1/5] Per-folder tests reorganization (#15725) 2022-02-23 15:46:28 -05:00
test_pipelines_document_question_answering.py Add DocumentQuestionAnswering pipeline (#18414) 2022-09-07 13:38:49 -04:00
test_pipelines_feature_extraction.py [Test refactor 1/5] Per-folder tests reorganization (#15725) 2022-02-23 15:46:28 -05:00
test_pipelines_fill_mask.py Running a pipeline of float16. (#17637) 2022-06-09 19:04:42 +02:00
test_pipelines_image_classification.py [Test refactor 1/5] Per-folder tests reorganization (#15725) 2022-02-23 15:46:28 -05:00
test_pipelines_image_segmentation.py Fix image segmentation and object detection pipeline tests (#18100) 2022-07-11 12:41:56 -04:00
test_pipelines_image_to_text.py Fix naming issue with ImageToText pipeline (#18864) 2022-09-02 07:55:30 -04:00
test_pipelines_object_detection.py Fix image segmentation and object detection pipeline tests (#18100) 2022-07-11 12:41:56 -04:00
test_pipelines_question_answering.py Adding a new align_to_words param to qa pipeline. (#18010) 2022-08-09 18:50:02 +02:00
test_pipelines_summarization.py Add LongT5 model (#16792) 2022-06-13 22:36:58 +02:00
test_pipelines_table_question_answering.py Black preview (#17217) 2022-05-12 16:25:55 -04:00
test_pipelines_text_classification.py Fixing a regression with return_all_scores introduced in #17606 (#17906) 2022-06-28 17:24:45 -04:00
test_pipelines_text_generation.py Adding support for device_map directly in pipeline(..) function. (#17902) 2022-07-15 15:54:26 +02:00
test_pipelines_text2text_generation.py Fixing return type tensor with num_return_sequences>1. (#16828) 2022-04-20 16:11:51 +02:00
test_pipelines_token_classification.py Fix test_dbmdz_english by updating expected values (#18482) 2022-08-05 16:49:54 +02:00
test_pipelines_translation.py Black preview (#17217) 2022-05-12 16:25:55 -04:00
test_pipelines_visual_question_answering.py Add Visual Question Answering (VQA) pipeline (#17286) 2022-06-13 07:49:44 -04:00
test_pipelines_zero_shot_image_classification.py The tests were not updated after the addition of torch.diag (#15890) 2022-03-03 15:33:49 +01:00
test_pipelines_zero_shot.py Black preview (#17217) 2022-05-12 16:25:55 -04:00