Skip to content

Commit 7653b7d

Browse files
committed
Update
[ghstack-poisoned]
2 parents f1af2b4 + 8396c61 commit 7653b7d

217 files changed

Lines changed: 29009 additions & 706 deletions

File tree

Some content is hidden

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

.github/labeler.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
- changed-files:
1010
- any-glob-to-any-file: ['torchrl/envs/libs/brax.py']
1111

12+
"Environments/mujoco_playground":
13+
- changed-files:
14+
- any-glob-to-any-file: ['torchrl/envs/libs/mujoco_playground.py']
15+
1216
"Environments/dm_control":
1317
- changed-files:
1418
- any-glob-to-any-file: ['torchrl/envs/libs/dm_control.py']
@@ -33,6 +37,10 @@
3337
- changed-files:
3438
- any-glob-to-any-file: ['torchrl/envs/libs/jumanji.py']
3539

40+
"Environments/libero":
41+
- changed-files:
42+
- any-glob-to-any-file: ['torchrl/envs/libs/libero.py', 'test/libs/test_libero.py']
43+
3644
"Environments/meltingpot":
3745
- changed-files:
3846
- any-glob-to-any-file: ['torchrl/envs/libs/meltingpot.py']

.github/labels.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@
132132
description: "Triggers brax environment tests only"
133133
color: "0E8A16"
134134

135+
- name: Environments/mujoco_playground
136+
description: "Triggers mujoco_playground environment tests only"
137+
color: "0E8A16"
138+
135139
- name: Environments/chess
136140
description: "Triggers chess environment tests only"
137141
color: "0E8A16"

.github/scripts/create_labels.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ gh label create "Environments" --repo "$REPO" --description "Triggers all enviro
2525

2626
# New granular labels
2727
gh label create "Environments/brax" --repo "$REPO" --description "Triggers brax environment tests only" --color "$ENV_COLOR" --force
28+
gh label create "Environments/mujoco_playground" --repo "$REPO" --description "Triggers mujoco_playground environment tests only" --color "$ENV_COLOR" --force
2829
gh label create "Environments/chess" --repo "$REPO" --description "Triggers chess environment tests only" --color "$ENV_COLOR" --force
2930
gh label create "Environments/envpool" --repo "$REPO" --description "Triggers envpool environment tests only" --color "$ENV_COLOR" --force
3031
gh label create "Environments/isaaclab" --repo "$REPO" --description "Triggers Isaac Lab environment tests only" --color "$ENV_COLOR" --force

.github/unittest/linux_libs/scripts_ataridqn/install.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,27 @@ git submodule sync && git submodule update --init --recursive
2929
printf "Installing PyTorch with cu128"
3030
if [[ "$TORCH_VERSION" == "nightly" ]]; then
3131
if [ "${CU_VERSION:-}" == cpu ] ; then
32-
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U
32+
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu -U
33+
pip3 install --pre torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U --no-deps
3334
else
34-
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu128 -U
35+
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu128 -U
36+
pip3 install --pre torchvision --index-url https://download.pytorch.org/whl/nightly/cu128 -U --no-deps
3537
fi
3638
elif [[ "$TORCH_VERSION" == "stable" ]]; then
3739
if [ "${CU_VERSION:-}" == cpu ] ; then
38-
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpu
40+
pip3 install torch --index-url https://download.pytorch.org/whl/cpu
41+
pip3 install torchvision --index-url https://download.pytorch.org/whl/cpu --no-deps
3942
else
40-
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu128
43+
pip3 install torch --index-url https://download.pytorch.org/whl/cu128
44+
pip3 install torchvision --index-url https://download.pytorch.org/whl/cu128 --no-deps
4145
fi
4246
else
4347
printf "Failed to install pytorch"
4448
exit 1
4549
fi
4650

51+
pip3 install pillow
52+
4753
# install tensordict
4854
if [[ "$RELEASE" == 0 ]]; then
4955
pip3 install git+https://github.com/pytorch/tensordict.git

.github/unittest/linux_libs/scripts_chess/install.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,22 @@ fi
4242
# submodules
4343
git submodule sync && git submodule update --init --recursive
4444

45-
printf "Installing PyTorch with cu128"
45+
printf "Installing PyTorch and torchvision with cu128"
4646
if [[ "$TORCH_VERSION" == "nightly" ]]; then
4747
if [ "${CU_VERSION:-}" == cpu ] ; then
48-
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U
48+
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu -U
49+
pip3 install --pre torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U --no-deps
4950
else
50-
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu128 -U
51+
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu128 -U
52+
pip3 install --pre torchvision --index-url https://download.pytorch.org/whl/nightly/cu128 -U --no-deps
5153
fi
5254
elif [[ "$TORCH_VERSION" == "stable" ]]; then
5355
if [ "${CU_VERSION:-}" == cpu ] ; then
54-
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpu
56+
pip3 install torch --index-url https://download.pytorch.org/whl/cpu
57+
pip3 install torchvision --index-url https://download.pytorch.org/whl/cpu --no-deps
5558
else
56-
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu128
59+
pip3 install torch --index-url https://download.pytorch.org/whl/cu128
60+
pip3 install torchvision --index-url https://download.pytorch.org/whl/cu128 --no-deps
5761
fi
5862
else
5963
printf "Failed to install pytorch"

.github/unittest/linux_libs/scripts_gen-dgrl/install.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,27 @@ git submodule sync && git submodule update --init --recursive
2929
printf "Installing PyTorch with cu128"
3030
if [[ "$TORCH_VERSION" == "nightly" ]]; then
3131
if [ "${CU_VERSION:-}" == cpu ] ; then
32-
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U
32+
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu -U
33+
pip3 install --pre torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U --no-deps
3334
else
34-
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu128 -U
35+
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu128 -U
36+
pip3 install --pre torchvision --index-url https://download.pytorch.org/whl/nightly/cu128 -U --no-deps
3537
fi
3638
elif [[ "$TORCH_VERSION" == "stable" ]]; then
3739
if [ "${CU_VERSION:-}" == cpu ] ; then
38-
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpu
40+
pip3 install torch --index-url https://download.pytorch.org/whl/cpu
41+
pip3 install torchvision --index-url https://download.pytorch.org/whl/cpu --no-deps
3942
else
40-
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu128
43+
pip3 install torch --index-url https://download.pytorch.org/whl/cu128
44+
pip3 install torchvision --index-url https://download.pytorch.org/whl/cu128 --no-deps
4145
fi
4246
else
4347
printf "Failed to install pytorch"
4448
exit 1
4549
fi
4650

51+
pip3 install pillow
52+
4753
# install tensordict
4854
if [[ "$RELEASE" == 0 ]]; then
4955
pip3 install git+https://github.com/pytorch/tensordict.git

.github/unittest/linux_libs/scripts_jumanji/install.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,22 @@ fi
2525
# submodules
2626
git submodule sync && git submodule update --init --recursive
2727

28-
printf "Installing PyTorch with cu128"
28+
printf "Installing PyTorch and torchvision with cu128"
2929
if [[ "$TORCH_VERSION" == "nightly" ]]; then
3030
if [ "${CU_VERSION:-}" == cpu ] ; then
31-
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U
31+
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu -U
32+
pip3 install --pre torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U --no-deps
3233
else
33-
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu128 -U
34+
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu128 -U
35+
pip3 install --pre torchvision --index-url https://download.pytorch.org/whl/nightly/cu128 -U --no-deps
3436
fi
3537
elif [[ "$TORCH_VERSION" == "stable" ]]; then
3638
if [ "${CU_VERSION:-}" == cpu ] ; then
37-
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpu
39+
pip3 install torch --index-url https://download.pytorch.org/whl/cpu
40+
pip3 install torchvision --index-url https://download.pytorch.org/whl/cpu --no-deps
3841
else
39-
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu128
42+
pip3 install torch --index-url https://download.pytorch.org/whl/cu128
43+
pip3 install torchvision --index-url https://download.pytorch.org/whl/cu128 --no-deps
4044
fi
4145
else
4246
printf "Failed to install pytorch"
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
#!/usr/bin/env bash
2+
3+
set -euxo pipefail
4+
5+
unset PYTORCH_VERSION
6+
7+
root_dir="$(git rev-parse --show-toplevel)"
8+
env_dir="${root_dir}/env"
9+
source "${env_dir}/bin/activate"
10+
export PATH="$HOME/.local/bin:$PATH"
11+
12+
uv_pip_install() {
13+
uv pip install --no-progress --python "${env_dir}/bin/python" "$@"
14+
}
15+
16+
if [ "${CU_VERSION:-}" == cpu ] ; then
17+
torch_index="https://download.pytorch.org/whl/nightly/cpu"
18+
stable_torch_index="https://download.pytorch.org/whl/cpu"
19+
else
20+
torch_index="https://download.pytorch.org/whl/nightly/${CU_VERSION}"
21+
stable_torch_index="https://download.pytorch.org/whl/${CU_VERSION}"
22+
fi
23+
24+
git submodule sync && git submodule update --init --recursive
25+
26+
uv_pip_install \
27+
cloudpickle \
28+
coverage \
29+
expecttest \
30+
future \
31+
hydra-core \
32+
hypothesis \
33+
importlib_metadata \
34+
orjson \
35+
packaging \
36+
psutil \
37+
"pyvers>=0.2.0,<0.3.0" \
38+
pybind11[global] \
39+
pytest \
40+
pytest-asyncio \
41+
pytest-cov \
42+
pytest-error-for-skips \
43+
pytest-instafail \
44+
pytest-json-report \
45+
pytest-mock \
46+
pytest-rerunfailures \
47+
pytest-timeout \
48+
pyyaml \
49+
scipy \
50+
setuptools \
51+
wheel
52+
53+
if [[ "$TORCH_VERSION" == "nightly" ]]; then
54+
uv_pip_install --upgrade --pre torch --index-url "${torch_index}"
55+
elif [[ "$TORCH_VERSION" == "stable" ]]; then
56+
uv_pip_install --upgrade torch --index-url "${stable_torch_index}"
57+
else
58+
echo "Failed to install pytorch"
59+
exit 1
60+
fi
61+
62+
# Install TensorDict before TorchRL. Nightly CI validates against TensorDict main.
63+
if [[ "$RELEASE" == 0 ]]; then
64+
uv_pip_install --no-build-isolation --no-deps git+https://github.com/pytorch/tensordict.git
65+
else
66+
uv_pip_install --no-deps tensordict
67+
fi
68+
69+
uv_pip_install -e . --no-build-isolation --no-deps
70+
71+
# LIBERO is source-only. Its root is a namespace-package parent; keep it on
72+
# PYTHONPATH at test time instead of relying on the upstream editable install.
73+
libero_dir="${root_dir}/libero-src"
74+
rm -rf "${libero_dir}"
75+
git clone --depth 1 https://github.com/Lifelong-Robot-Learning/LIBERO.git "${libero_dir}"
76+
77+
# robosuite 1.4.0 calls the pre-3.10 mj_fullM signature.
78+
uv_pip_install \
79+
"bddl==1.0.1" \
80+
easydict \
81+
"gym==0.25.2" \
82+
h5py \
83+
imageio \
84+
matplotlib \
85+
"mujoco<3.10.0" \
86+
"numpy<2" \
87+
opencv-python \
88+
"robosuite==1.4.0" \
89+
termcolor \
90+
tqdm
91+
92+
timeout 120s python -c "import functorch; import tensordict; import torchrl"
93+
94+
export LIBERO_CONFIG_PATH="${root_dir}/.libero-ci"
95+
timeout 120s env PYTHONPATH="${libero_dir}:${PYTHONPATH:-}" python -c "from torchrl.envs.libs.libero import _ensure_libero_config; _ensure_libero_config()"
96+
timeout 120s env PYTHONPATH="${libero_dir}:${PYTHONPATH:-}" python -c "from libero.libero import benchmark; from libero.libero.envs import OffScreenRenderEnv; print(sorted(benchmark.get_benchmark_dict()))"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
source ./env/bin/activate
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
3+
set -euxo pipefail
4+
5+
this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
6+
7+
bash "${this_dir}/setup_env.sh"
8+
bash "${this_dir}/install.sh"
9+
PYTHON=./env/bin/python bash "$(git rev-parse --show-toplevel)/.github/unittest/helpers/assert_torch_version.sh" "$TORCH_VERSION"
10+
PYTHON=./env/bin/python bash "$(git rev-parse --show-toplevel)/.github/unittest/helpers/assert_torch_tensordict_versions.sh" "$TORCH_VERSION"
11+
bash "${this_dir}/run_test.sh"
12+
bash "${this_dir}/post_process.sh"

0 commit comments

Comments
 (0)