transformers/tests/trainer
Yao Matrix a5a0c7b888
switch to device agnostic device calling for test cases (#38247)
* use device agnostic APIs in test cases

Signed-off-by: Matrix Yao <matrix.yao@intel.com>

* fix style

Signed-off-by: Matrix Yao <matrix.yao@intel.com>

* add one more

Signed-off-by: YAO Matrix <matrix.yao@intel.com>

* xpu now supports integer device id, aligning to CUDA behaviors

Signed-off-by: Matrix Yao <matrix.yao@intel.com>

* update to use device_properties

Signed-off-by: Matrix Yao <matrix.yao@intel.com>

* fix style

Signed-off-by: Matrix Yao <matrix.yao@intel.com>

* update comment

Signed-off-by: Matrix Yao <matrix.yao@intel.com>

* fix comments

Signed-off-by: Matrix Yao <matrix.yao@intel.com>

* fix style

Signed-off-by: Matrix Yao <matrix.yao@intel.com>

---------

Signed-off-by: Matrix Yao <matrix.yao@intel.com>
Signed-off-by: YAO Matrix <matrix.yao@intel.com>
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2025-05-26 10:18:53 +02:00
..
__init__.py [Test refactor 1/5] Per-folder tests reorganization (#15725) 2022-02-23 15:46:28 -05:00
test_data_collator.py add FlashAttentionKwargs and seq_idx to flat collator (#36456) 2025-04-16 15:45:03 +02:00
test_trainer_callback.py fix: prevent second save in the end of training if last step was saved already (#36219) 2025-02-20 17:38:52 +01:00
test_trainer_distributed_loss.py fix bug in distributed loss test (#38166) 2025-05-16 16:21:35 +00:00
test_trainer_distributed_worker_seed.py enable trainer test cases on xpu (#38138) 2025-05-15 12:17:44 +00:00
test_trainer_distributed.py Use Python 3.9 syntax in tests (#37343) 2025-04-08 14:12:08 +02:00
test_trainer_fsdp.py fix FSDP + torch.compile bug when saving pretrained model (#37725) 2025-05-06 17:51:28 +02:00
test_trainer_seq2seq.py [generation] Less verbose warnings by default (#38179) 2025-05-19 10:03:37 +00:00
test_trainer_tpu.py Use Python 3.9 syntax in tests (#37343) 2025-04-08 14:12:08 +02:00
test_trainer_utils.py Use Python 3.9 syntax in tests (#37343) 2025-04-08 14:12:08 +02:00
test_trainer.py switch to device agnostic device calling for test cases (#38247) 2025-05-26 10:18:53 +02:00