[tests] add accelerate marker (#21743)

* add `accelerate` marker

* add to docs

* Update docs/source/en/testing.mdx
This commit is contained in:
Younes Belkada
2023-02-27 12:33:34 +01:00
committed by GitHub
parent c51dc4f927
commit 831f3144a6
2 changed files with 17 additions and 0 deletions

View File

@@ -176,6 +176,15 @@ If you want to include only tests that include both patterns, `and` is to be use
```bash
pytest -k "test and ada" tests/test_optimization.py
```
### Run `accelerate` tests
Sometimes you need to run `accelerate` tests on your models. For that you can just add `-m accelerate_tests` to your command, if let's say you want to run these tests on `OPT` run:
```bash
RUN_SLOW=1 pytest -m accelerate_tests tests/models/opt/test_modeling_opt.py
```
### Run documentation tests
In order to test whether the documentation examples are correct, you should check that the `doctests` are passing.