transformers/tests/utils
Matt d6cec45801
XLA train step fixes (#17973)
* Copy inputs to train and test step before modifying them, as this breaks things

* Add XLA tests, fix our loss functions to be XLA-compatible

* make fixup

* Update loss computation test to expect vector of per-sample losses

* Patch loss for TFLED

* Patch loss for TFAlbert

* Add a tf_legacy_loss config flag that enables old loss functions

* Stop using config.get() because it's not a dict

* Skip loss computation test for RAG because its loss is very strange and I'm afraid to rewrite it

* make fixup

* Add XLA-compatible RAG loss

* Fix dtype of loss mask for TFAlbert

* Fix test for XLNet too because it overrides the default one

* make fixup

* Fix config test

* No more depending on GPU NaN behaviour

* Add test, avoid potential zero division

* Fix test item assignment

* Fix loss computation masking test

* make fixup

* Fix dtype bugs
2022-07-01 19:11:14 +01:00
..
__init__.py [Test refactor 1/5] Per-folder tests reorganization (#15725) 2022-02-23 15:46:28 -05:00
test_activations_tf.py TF: Add sigmoid activation function (#16819) 2022-04-19 16:13:08 +01:00
test_activations.py TF: Add sigmoid activation function (#16819) 2022-04-19 16:13:08 +01:00
test_add_new_model_like.py Reorganize file utils (#16264) 2022-03-23 10:26:33 -04:00
test_cli.py CLI: tool to convert PT into TF weights and open hub PR (#17497) 2022-06-01 18:52:07 +01:00
test_convert_slow_tokenizer.py Black preview (#17217) 2022-05-12 16:25:55 -04:00
test_doc_samples.py [Test refactor 1/5] Per-folder tests reorganization (#15725) 2022-02-23 15:46:28 -05:00
test_file_utils.py 🐛 Properly raise RepoNotFoundError when not authenticated (#17651) 2022-06-10 15:41:53 +02:00
test_generic.py Add MLFLOW_FLATTEN_PARAMS support in MLflowCallback (#17148) 2022-05-10 14:29:18 -04:00
test_hf_argparser.py Support PEP 563 for HfArgumentParser (#15795) 2022-03-17 13:51:37 -04:00
test_image_utils.py [Test refactor 1/5] Per-folder tests reorganization (#15725) 2022-02-23 15:46:28 -05:00
test_logging.py [Test refactor 1/5] Per-folder tests reorganization (#15725) 2022-02-23 15:46:28 -05:00
test_model_card.py Black preview (#17217) 2022-05-12 16:25:55 -04:00
test_model_output.py Reorganize file utils (#16264) 2022-03-23 10:26:33 -04:00
test_modeling_tf_core.py XLA train step fixes (#17973) 2022-07-01 19:11:14 +01:00
test_offline.py Make Transformers use cache files when hf.co is down (#16362) 2022-03-23 15:56:49 -04:00
test_skip_decorators.py [Test refactor 1/5] Per-folder tests reorganization (#15725) 2022-02-23 15:46:28 -05:00
test_utils_check_copies.py Black preview (#17217) 2022-05-12 16:25:55 -04:00
test_versions_utils.py [Test refactor 1/5] Per-folder tests reorganization (#15725) 2022-02-23 15:46:28 -05:00