Skip to content

Commit 5ec5981

Browse files
author
Vincent Moens
committed
Update
[ghstack-poisoned]
2 parents 11f7d8a + 93115f8 commit 5ec5981

File tree

441 files changed

+22992
-9474
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

441 files changed

+22992
-9474
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
pip install --upgrade setuptools
4+
5+
export TORCHRL_BUILD_VERSION=0.8.0

.github/scripts/pre-build-script.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
pip install --upgrade setuptools
4+
5+
${CONDA_RUN} pip install "pybind11[global]"
6+
${CONDA_RUN} conda install anaconda::cmake -y
7+
${CONDA_RUN} pip install git+https://github.com/pytorch/tensordict.git -U

.github/scripts/td_script.sh

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
#!/bin/bash
22

3-
export TORCHRL_BUILD_VERSION=0.6.1
3+
export TORCHRL_BUILD_VERSION=0.8.0
4+
pip install --upgrade setuptools
45

5-
${CONDA_RUN} pip install git+https://github.com/pytorch/tensordict.git -U
6+
# Check if ARCH is set to aarch64
7+
ARCH=${ARCH:-} # This sets ARCH to an empty string if it's not defined
8+
9+
if pip list | grep -q torch; then
10+
echo "Torch is installed."
11+
12+
# ${CONDA_RUN} conda install 'anaconda::cmake>=3.22' -y
13+
14+
${CONDA_RUN} pip install "pybind11[global]"
15+
16+
${CONDA_RUN} pip install git+https://github.com/pytorch/tensordict.git -U --no-deps
17+
elif [[ -n "${SMOKE_TEST_SCRIPT:-}" ]]; then
18+
${CONDA_RUN} ${PIP_INSTALL_TORCH}
19+
# TODO: revert when nightlies of tensordict are fixed
20+
# if [[ "$ARCH" == "aarch64" ]]; then
21+
22+
23+
# ${CONDA_RUN} conda install 'anaconda::cmake>=3.22' -y
24+
25+
${CONDA_RUN} pip install "pybind11[global]"
26+
27+
${CONDA_RUN} pip install git+https://github.com/pytorch/tensordict.git -U --no-deps
28+
else
29+
echo "Torch is not installed - tensordict will be installed later."
30+
fi

.github/scripts/version_script.bat

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,56 @@
11
@echo off
2-
set TORCHRL_BUILD_VERSION=0.6.1
2+
set TORCHRL_BUILD_VERSION=0.8.0
33
echo TORCHRL_BUILD_VERSION is set to %TORCHRL_BUILD_VERSION%
4+
5+
@echo on
6+
7+
set VC_VERSION_LOWER=17
8+
set VC_VERSION_UPPER=18
9+
if "%VC_YEAR%" == "2019" (
10+
set VC_VERSION_LOWER=16
11+
set VC_VERSION_UPPER=17
12+
)
13+
if "%VC_YEAR%" == "2017" (
14+
set VC_VERSION_LOWER=15
15+
set VC_VERSION_UPPER=16
16+
)
17+
18+
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -legacy -products * -version [%VC_VERSION_LOWER%^,%VC_VERSION_UPPER%^) -property installationPath`) do (
19+
if exist "%%i" if exist "%%i\VC\Auxiliary\Build\vcvarsall.bat" (
20+
set "VS15INSTALLDIR=%%i"
21+
set "VS15VCVARSALL=%%i\VC\Auxiliary\Build\vcvarsall.bat"
22+
goto vswhere
23+
)
24+
)
25+
26+
:vswhere
27+
if "%VSDEVCMD_ARGS%" == "" (
28+
call "%VS15VCVARSALL%" x64 || exit /b 1
29+
) else (
30+
call "%VS15VCVARSALL%" x64 %VSDEVCMD_ARGS% || exit /b 1
31+
)
32+
33+
@echo on
34+
35+
if "%CU_VERSION%" == "xpu" call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
36+
37+
set DISTUTILS_USE_SDK=1
38+
39+
:: Upgrade setuptools before installing PyTorch
40+
pip install --upgrade setuptools==72.1.0 || exit /b 1
41+
42+
set args=%1
43+
shift
44+
:start
45+
if [%1] == [] goto done
46+
set args=%args% %1
47+
shift
48+
goto start
49+
50+
:done
51+
if "%args%" == "" (
52+
echo Usage: vc_env_helper.bat [command] [args]
53+
echo e.g. vc_env_helper.bat cl /c test.cpp
54+
)
55+
56+
%args% || exit /b 1

.github/unittest/helpers/coverage_run_parallel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ def write_config(config_path: Path, argv: List[str]) -> None:
2828
argv: Arguments passed to this script, which need to be converted to config file entries
2929
"""
3030
assert not config_path.exists(), "Temporary coverage config exists already"
31-
cmdline = " ".join(shlex.quote(arg) for arg in argv[1:])
32-
with open(str(config_path), "wt", encoding="utf-8") as fh:
31+
cmdline = shlex.join(argv[1:])
32+
with open(str(config_path), "w", encoding="utf-8") as fh:
3333
fh.write(
3434
f"""# .coveragerc to control coverage.py
3535
[run]

.github/unittest/linux/scripts/environment.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ dependencies:
1717
- pytest-instafail
1818
- pytest-rerunfailures
1919
- pytest-timeout
20+
- pytest-asyncio
2021
- expecttest
22+
- pybind11[global]
2123
- pyyaml
2224
- scipy
2325
- hydra-core

.github/unittest/linux/scripts/run_all.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ set -v
99

1010
if [[ $OSTYPE != 'darwin'* ]]; then
1111
apt-get update && apt-get upgrade -y
12-
apt-get install -y vim git wget libsdl2-dev libsdl2-2.0-0
12+
apt-get install -y vim git wget libsdl2-dev libsdl2-2.0-0 cmake
1313

1414
apt-get install -y libglfw3 libgl1-mesa-glx libosmesa6 libglew-dev
15-
apt-get install -y libglvnd0 libgl1 libglx0 libegl1 libgles2
15+
apt-get install -y libglvnd0 libgl1 libglx0 libegl1 libgles2 xvfb
1616

1717
if [ "${CU_VERSION:-}" == cpu ] ; then
1818
# solves version `GLIBCXX_3.4.29' not found for tensorboard
@@ -76,11 +76,12 @@ else
7676
export MUJOCO_GL=egl
7777
fi
7878

79-
export DISPLAY=:0
8079
export SDL_VIDEODRIVER=dummy
8180

8281
# legacy from bash scripts: remove?
83-
conda env config vars set MUJOCO_GL=$MUJOCO_GL PYOPENGL_PLATFORM=$MUJOCO_GL DISPLAY=:0 SDL_VIDEODRIVER=dummy LAZY_LEGACY_OP=False RL_LOGGING_LEVEL=DEBUG
82+
conda env config vars set \
83+
MAX_IDLE_COUNT=1000 \
84+
MUJOCO_GL=$MUJOCO_GL PYOPENGL_PLATFORM=$MUJOCO_GL DISPLAY=:99 SDL_VIDEODRIVER=dummy LAZY_LEGACY_OP=False RL_LOGGING_LEVEL=DEBUG TOKENIZERS_PARALLELISM=true
8485

8586
pip3 install pip --upgrade
8687
pip install virtualenv
@@ -95,9 +96,9 @@ echo "installing gymnasium"
9596
if [[ "$PYTHON_VERSION" == "3.12" ]]; then
9697
pip3 install ale-py
9798
pip3 install sympy
98-
pip3 install "gymnasium[accept-rom-license,mujoco]<1.0" mo-gymnasium[mujoco]
99+
pip3 install "gymnasium[mujoco]>=1.1" mo-gymnasium[mujoco]
99100
else
100-
pip3 install "gymnasium[atari,accept-rom-license,mujoco]<1.0" mo-gymnasium[mujoco]
101+
pip3 install "gymnasium[atari,mujoco]>=1.1" mo-gymnasium[mujoco]
101102
fi
102103
pip3 install "mujoco" -U
103104

@@ -200,6 +201,8 @@ export CKPT_BACKEND=torch
200201
export MAX_IDLE_COUNT=100
201202
export BATCHED_PIPE_TIMEOUT=60
202203

204+
Xvfb :99 -screen 0 1024x768x24 &
205+
203206
pytest test/smoke_test.py -v --durations 200
204207
pytest test/smoke_test_deps.py -v --durations 200 -k 'test_gym or test_dm_control_pixels or test_dm_control or test_tb'
205208
if [ "${CU_VERSION:-}" != cpu ] ; then

.github/unittest/linux_distributed/scripts/environment.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ dependencies:
1616
- pytest-mock
1717
- pytest-instafail
1818
- pytest-rerunfailures
19+
- pytest-asyncio
1920
- expecttest
21+
- pybind11[global]
2022
- pyyaml
2123
- scipy
2224
- hydra-core

.github/unittest/linux_distributed/scripts/setup_env.sh

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,14 @@ fi
6464

6565
export MUJOCO_GL=$PRIVATE_MUJOCO_GL
6666
conda env config vars set MUJOCO_PY_MUJOCO_PATH=$root_dir/.mujoco/mujoco210 \
67-
DISPLAY=unix:0.0 \
67+
MAX_IDLE_COUNT=1000 \
68+
DISPLAY=:99 \
6869
MJLIB_PATH=$root_dir/.mujoco/mujoco-2.1.1/lib/libmujoco.so.2.1.1 \
6970
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$root_dir/.mujoco/mujoco210/bin \
7071
SDL_VIDEODRIVER=dummy \
7172
MUJOCO_GL=$PRIVATE_MUJOCO_GL \
72-
PYOPENGL_PLATFORM=$PRIVATE_MUJOCO_GL
73+
PYOPENGL_PLATFORM=$PRIVATE_MUJOCO_GL \
74+
TOKENIZERS_PARALLELISM=true
7375

7476
# Software rendering requires GLX and OSMesa.
7577
if [ $PRIVATE_MUJOCO_GL == 'egl' ] || [ $PRIVATE_MUJOCO_GL == 'osmesa' ] ; then
@@ -94,32 +96,8 @@ if [[ $OSTYPE != 'darwin'* ]]; then
9496
# install ale-py: manylinux names are broken for CentOS so we need to manually download and
9597
# rename them
9698
PY_VERSION=$(python --version)
97-
echo "installing ale-py for ${PY_PY_VERSION}"
98-
if [[ $PY_VERSION == *"3.7"* ]]; then
99-
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
100-
pip install ale_py-0.8.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
101-
rm ale_py-0.8.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
102-
elif [[ $PY_VERSION == *"3.8"* ]]; then
103-
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
104-
pip install ale_py-0.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
105-
rm ale_py-0.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
106-
elif [[ $PY_VERSION == *"3.9"* ]]; then
107-
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
108-
pip install ale_py-0.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
109-
rm ale_py-0.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
110-
elif [[ $PY_VERSION == *"3.10"* ]]; then
111-
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
112-
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
113-
pip install ale_py-0.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
114-
rm ale_py-0.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
115-
elif [[ $PY_VERSION == *"3.11"* ]]; then
116-
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
117-
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
118-
pip install ale_py-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
119-
rm ale_py-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
120-
fi
12199
echo "installing gymnasium"
122-
pip install "gymnasium[atari,accept-rom-license]<1.0"
100+
pip install "gymnasium[atari]>=1.1"
123101
else
124-
pip install "gymnasium[atari,accept-rom-license]<1.0"
102+
pip install "gymnasium[atari]>=1.1"
125103
fi

.github/unittest/linux_libs/scripts_ataridqn/environment.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ dependencies:
1515
- pytest-instafail
1616
- pytest-rerunfailures
1717
- pytest-error-for-skips
18+
- pytest-asyncio
1819
- expecttest
20+
- pybind11[global]
1921
- pyyaml
2022
- scipy
2123
- hydra-core

0 commit comments

Comments
 (0)