8 Commits

Author SHA1 Message Date
Sebastian
7d5e7c089c
refactor: Use TableQuestionAnsweringPipeline from transformers (#4303)
* Added changes from table-qa-pipeline

* Moved classes around to make diff to main look nicer.

* Cleaned things up. Removed option to return_no_answer (not needed), added docs and added integration marks.

* Remove unneeded code

* Added fix for test

* Add check for document_ids in answer

* Prevent passing of empty list to np.mean

* Batching doesn't work with TableQAPipeline b/c of HF issue

* Cleanup of table reader tests, added check for document ids.

* Fixing pylint

* More pylint

* PR comments

---------

Co-authored-by: bogdankostic <bogdankostic@web.de>
2023-03-07 11:46:50 +01:00
Sebastian
5b0b338175
fix: Ensure eval mode for TableReader model for predictions (#3743)
* Adding model.eval() calls to prediction functions in table reader

* Add unit test to check if model is set in train mode that inference time prediction still works.
2023-01-09 11:07:06 +01:00
Sebastian
659020fcac
fix: Convert table cells to strings for compatibility with TableReader (#3762)
* Add table = table.astype(str) to make sure cells are converted into to strings to be compatible witht the TableReader

* Turn more strings into ints

* Make sure answer text is always a string.
2023-01-09 10:42:11 +01:00
Sebastian
756e0114e6
refactor: Remove duplicate code in TableReader (#3708)
* Refactor table reader to use util functions to reduce code duplication.

* Expanding the tests for the table reader

* Adding types

* Updating tests to work for RCIReader

* Fix bug in RCIReader. Saving the wrong queries list.

* Update _flatten_inputs to not change input variable

* Remove duplicate code
2022-12-21 14:33:19 +01:00
Sebastian
25bf95d47f
Update table reader tests to include checking the score of answers. (#3641) 2022-12-07 07:30:49 -08:00
Sebastian
8db7dfb884
refactor: TableReader (#3456)
* Refactoring table reader
2022-10-26 20:57:28 +02:00
bogdankostic
867695ad0c
Change signature of queries param in batch methods (#2575)
* Change signature of queries param in batch methods

* Update Documentation & Code Style

* Fix mypy

* Remove unused import

* Update Documentation & Code Style

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-24 12:33:45 +02:00
Sara Zan
ff4303c51b
[CI refactoring] Categorize tests into folders (#2554)
* Categorize tests into folders

* Fix linux_ci.yml and an import

* Wrong path
2022-05-17 09:55:53 +01:00