transformers/tests
Nicolas Patry a4386d7e40
[BC] Fixing usage of text pairs (#17324)
* [BC] Fixing usage of text pairs

The BC is actually preventing users from misusing the pipeline since
users could have been willing to send text pairs and the pipeline would
instead understand the thing as a batch returning bogus results.

The correct usage of text pairs is preserved in this PR even when that
makes the code clunky.

Adds support for {"text":..,, "text_pair": ...} inputs for both dataset
iteration and more explicit usage to pairs.

* Updating the doc.

* Update src/transformers/pipelines/text_classification.py

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* Update src/transformers/pipelines/text_classification.py

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* Update tests/pipelines/test_pipelines_text_classification.py

Co-authored-by: Lysandre Debut <lysandre@huggingface.co>

* quality.

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Lysandre Debut <lysandre@huggingface.co>
2022-05-19 10:29:16 +02:00
..
benchmark [Test refactor 1/5] Per-folder tests reorganization (#15725) 2022-02-23 15:46:28 -05:00
deepspeed missing file (#17164) 2022-05-10 10:19:50 -07:00
extended Update self-push workflow (#17177) 2022-05-13 16:28:00 +02:00
fixtures add a warning in SpmConverter for sentencepiece's model using the byte fallback feature (#16629) 2022-04-11 11:06:10 +02:00
generation Black preview (#17217) 2022-05-12 16:25:55 -04:00
models Fix test_t5_decoder_model_past_large_inputs (#17320) 2022-05-18 17:57:23 +02:00
onnx Add onnx export cuda support (#17183) 2022-05-18 17:52:13 +02:00
optimization [Test refactor 1/5] Per-folder tests reorganization (#15725) 2022-02-23 15:46:28 -05:00
pipelines [BC] Fixing usage of text pairs (#17324) 2022-05-19 10:29:16 +02:00
sagemaker Black preview (#17217) 2022-05-12 16:25:55 -04:00
tokenization [Test refactor 1/5] Per-folder tests reorganization (#15725) 2022-02-23 15:46:28 -05:00
trainer [tests] fix copy-n-paste error (#17312) 2022-05-18 16:00:47 -07:00
utils Fix tests of mixed precision now that experimental is deprecated (#17300) 2022-05-17 14:14:17 +01:00
__init__.py GPU text generation: mMoved the encoded_prompt to correct device 2020-01-06 15:11:12 +01:00
test_configuration_common.py Black preview (#17217) 2022-05-12 16:25:55 -04:00
test_feature_extraction_common.py Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
test_modeling_common.py Fix test_model_parallelization (#17249) 2022-05-16 23:30:49 +02:00
test_modeling_flax_common.py [Flax] improve large model init and loading (#16148) 2022-04-19 14:19:55 +02:00
test_modeling_tf_common.py Rewrite TensorFlow train_step and test_step (#17057) 2022-05-17 14:36:23 +01:00
test_sequence_feature_extraction_common.py Some tests misusing assertTrue for comparisons fix (#16771) 2022-04-19 14:44:08 +02:00
test_tokenization_common.py Black preview (#17217) 2022-05-12 16:25:55 -04:00