From 788780481ac7fc64e0dc441058c0f1bed5d69c18 Mon Sep 17 00:00:00 2001 From: Vincent Moens Date: Thu, 12 Sep 2024 11:22:20 +0100 Subject: [PATCH] [CI] Add benchmarks to test runs ghstack-source-id: b53a57a3c05dc960ec94615eecbb97d8e58091fb 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 \