From 4bb9084045ae14369ca53dc1e5f2b56516107fcb Mon Sep 17 00:00:00 2001 From: Vincent Moens Date: Mon, 2 Sep 2024 18:05:39 +0100 Subject: [PATCH] [CI] Add benchmarks to test runs ghstack-source-id: 06870204d47411f4c9f31d2a42cf402704876322 Pull Request resolved: https://github.com/pytorch/rl/pull/2410 --- .github/unittest/linux/scripts/environment.yml | 1 + .github/unittest/linux/scripts/run_all.sh | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.github/unittest/linux/scripts/environment.yml b/.github/unittest/linux/scripts/environment.yml index 2234683a497..38d95eb3353 100644 --- a/.github/unittest/linux/scripts/environment.yml +++ b/.github/unittest/linux/scripts/environment.yml @@ -15,6 +15,7 @@ dependencies: - pytest-cov - pytest-mock - pytest-instafail + - pytest-benchmark - pytest-rerunfailures - pytest-timeout - expecttest diff --git a/.github/unittest/linux/scripts/run_all.sh b/.github/unittest/linux/scripts/run_all.sh index 3257adf8c63..3421b11f550 100755 --- a/.github/unittest/linux/scripts/run_all.sh +++ b/.github/unittest/linux/scripts/run_all.sh @@ -189,9 +189,14 @@ export MKL_THREADING_LAYER=GNU export CKPT_BACKEND=torch export MAX_IDLE_COUNT=100 export BATCHED_PIPE_TIMEOUT=60 +export TORCHDYNAMO_INLINE_INBUILT_NN_MODULES=1 pytest test/smoke_test.py -v --durations 200 pytest test/smoke_test_deps.py -v --durations 200 -k 'test_gym or test_dm_control_pixels or test_dm_control or test_tb' + +# Check that benchmarks run +python -m pytest benchmarks + if [ "${CU_VERSION:-}" != cpu ] ; then python .github/unittest/helpers/coverage_run_parallel.py -m pytest test \ --instafail --durations 200 -vv --capture no --ignore test/test_rlhf.py \