diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index aecc9b7d7..e542782d2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,9 +34,15 @@ errors, the commit will fail and you will see the changes that need to be made. We use `pytest` to run tests. Because `alibi` uses some TensorFlow 1.x constructs, to run all tests you need to invoke `pytest` twice as follows: ```bash -pytest -m tf1 alibi -pytest -m "not tf1 alibi" +TF_USE_LEGACY_KERAS=1 pytest -m "tf1" alibi +pytest -m "not tf1" alibi ``` + +or run directly: +```bash +make test +``` + [see also here](https://github.com/SeldonIO/alibi/blob/4d4f49e07263b20a25f552a8485844dc12281074/.github/workflows/ci.yml#L46-L47). It is not necessary to run the whole test suite locally for every PR as this can take a long time, it is enough to run `pytest` only on the affected test files or test functions. The whole test suite is run in CI on every PR.