transformers/docs/source
Alex McKinney 9da451713d
Device agnostic testing (#25870)
* adds agnostic decorators and availability fns

* renaming decorators and fixing imports

* updating some representative example tests
bloom, opt, and reformer for now

* wip device agnostic functions

* lru cache to device checking functions

* adds `TRANSFORMERS_TEST_DEVICE_SPEC`
if present, imports the target file and updates device to function
mappings

* comments `TRANSFORMERS_TEST_DEVICE_SPEC` code

* extra checks on device name

* `make style; make quality`

* updates default functions for agnostic calls

* applies suggestions from review

* adds `is_torch_available` guard

* Add spec file to docs, rename function dispatch names to backend_*

* add backend import to docs example for spec file

* change instances of  to

* Move register backend to before device check as per @statelesshz changes

* make style

* make opt test require fp16 to run

---------

Co-authored-by: arsalanu <arsalanu@graphcore.ai>
Co-authored-by: arsalanu <hzji210@gmail.com>
2023-10-24 16:49:26 +02:00
..
de [i18n-DE] contribute chapter (#26481) 2023-10-02 09:56:40 -07:00
en Device agnostic testing (#25870) 2023-10-24 16:49:26 +02:00
es docs: update link huggingface map (#26077) 2023-09-11 12:57:04 +01:00
fr Fix typos (#25936) 2023-09-04 11:15:12 +01:00
it [Docs] Fix un-rendered images (#25561) 2023-08-17 12:08:11 +02:00
ja Refactor code part in documentation translated to japanese (#26900) 2023-10-18 10:35:58 -07:00
ko 🌐 [i18n-KO] Translated big_models.md to Korean (#26245) 2023-10-12 15:00:12 -07:00
ms Add BROS (#23190) 2023-09-14 18:02:37 +01:00
pt docs: update link huggingface map (#26077) 2023-09-11 12:57:04 +01:00
te Added Telugu [te] translations (#26828) 2023-10-20 15:27:55 -07:00
zh 🌐 [i18n-ZH] Translate create_a_model.md into Chinese (#27026) 2023-10-23 15:44:42 -07:00
_config.py Adding evaluate to the list of libraries required in generated notebooks (#20850) 2022-12-21 14:04:08 +01:00