Skip to content

Commit c0ba3ff

Browse files
author
Vincent Moens
committed
[Refactor,CI] Refactor SOTA tests
ghstack-source-id: b14c59b Pull Request resolved: #2583
1 parent 863121a commit c0ba3ff

File tree

9 files changed

+136
-130
lines changed

9 files changed

+136
-130
lines changed

.github/unittest/linux_examples/scripts/run_all.sh renamed to .github/unittest/linux_sota/scripts/run_all.sh

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -106,30 +106,6 @@ python -c """import gym;import d4rl"""
106106

107107
# install ale-py: manylinux names are broken for CentOS so we need to manually download and
108108
# rename them
109-
PY_VERSION=$(python --version)
110-
if [[ $PY_VERSION == *"3.7"* ]]; then
111-
wget https://files.pythonhosted.org/packages/ab/fd/6615982d9460df7f476cad265af1378057eee9daaa8e0026de4cedbaffbd/ale_py-0.8.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
112-
pip install ale_py-0.8.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
113-
rm ale_py-0.8.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
114-
elif [[ $PY_VERSION == *"3.8"* ]]; then
115-
wget https://files.pythonhosted.org/packages/0f/8a/feed20571a697588bc4bfef05d6a487429c84f31406a52f8af295a0346a2/ale_py-0.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
116-
pip install ale_py-0.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
117-
rm ale_py-0.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
118-
elif [[ $PY_VERSION == *"3.9"* ]]; then
119-
wget https://files.pythonhosted.org/packages/a0/98/4316c1cedd9934f9a91b6e27a9be126043b4445594b40cfa391c8de2e5e8/ale_py-0.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
120-
pip install ale_py-0.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
121-
rm ale_py-0.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
122-
elif [[ $PY_VERSION == *"3.10"* ]]; then
123-
wget https://files.pythonhosted.org/packages/60/1b/3adde7f44f79fcc50d0a00a0643255e48024c4c3977359747d149dc43500/ale_py-0.8.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
124-
mv ale_py-0.8.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl ale_py-0.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
125-
pip install ale_py-0.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
126-
rm ale_py-0.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
127-
elif [[ $PY_VERSION == *"3.11"* ]]; then
128-
wget https://files.pythonhosted.org/packages/60/1b/3adde7f44f79fcc50d0a00a0643255e48024c4c3977359747d149dc43500/ale_py-0.8.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
129-
mv ale_py-0.8.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl ale_py-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
130-
pip install ale_py-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
131-
rm ale_py-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
132-
fi
133109
pip install "gymnasium[atari,accept-rom-license]<1.0"
134110

135111
# ============================================================================================ #
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
set -v
5+
6+
# Initialize an error flag
7+
error_occurred=0
8+
# Function to handle errors
9+
error_handler() {
10+
echo "Error on line $1"
11+
error_occurred=1
12+
}
13+
# Trap ERR to call the error_handler function with the failing line number
14+
trap 'error_handler $LINENO' ERR
15+
16+
export PYTORCH_TEST_WITH_SLOW='1'
17+
python -m torch.utils.collect_env
18+
# Avoid error: "fatal: unsafe repository"
19+
git config --global --add safe.directory '*'
20+
21+
root_dir="$(git rev-parse --show-toplevel)"
22+
env_dir="${root_dir}/env"
23+
lib_dir="${env_dir}/lib"
24+
25+
# solves ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found
26+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$lib_dir
27+
export MKL_THREADING_LAYER=GNU
28+
export CUDA_LAUNCH_BLOCKING=1
29+
30+
python .github/unittest/helpers/coverage_run_parallel.py -m pytest test/smoke_test.py -v --durations 200
31+
32+
coverage run -m pytest .github/unittest/linux_sota/scripts/test_sota.py --instafail --durations 200 -vvv --capture no
33+
34+
coverage combine
35+
coverage xml -i

0 commit comments

Comments
 (0)