Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
1f6f327
Fixed MultiSyncCollector set_seed and split_trajs issue
ParamThakkar123 Jan 19, 2026
e2aaf6b
Merge branch 'main' of https://github.com/pytorch/rl
ParamThakkar123 Jan 20, 2026
40642d5
Revert "Fixed MultiSyncCollector set_seed and split_trajs issue"
ParamThakkar123 Jan 20, 2026
efdc89c
Merge branch 'main' of https://github.com/pytorch/rl
ParamThakkar123 Jan 21, 2026
628f44b
Merge branch 'main' of https://github.com/pytorch/rl
ParamThakkar123 Jan 23, 2026
a476a77
Merge branch 'main' of https://github.com/pytorch/rl
ParamThakkar123 Jan 24, 2026
0f565c5
Merge branch 'main' of https://github.com/pytorch/rl
ParamThakkar123 Jan 25, 2026
7fb086b
Merge branch 'main' of https://github.com/pytorch/rl
ParamThakkar123 Jan 26, 2026
ff72793
Merge branch 'main' of https://github.com/pytorch/rl
ParamThakkar123 Jan 28, 2026
69001ed
Added Support for index_select in TensorSpec
ParamThakkar123 Jan 28, 2026
4ab13be
Merge branch 'main' of https://github.com/pytorch/rl
ParamThakkar123 Jan 29, 2026
2e8face
rebase
ParamThakkar123 Jan 29, 2026
56e1529
Merge branch 'main' of https://github.com/pytorch/rl
ParamThakkar123 Jan 31, 2026
ba6a19f
Merge branch 'main' of https://github.com/pytorch/rl
ParamThakkar123 Feb 4, 2026
8be545b
Merge branch 'main' of https://github.com/pytorch/rl
ParamThakkar123 Feb 5, 2026
54abe29
Merge branch 'main' of https://github.com/pytorch/rl
ParamThakkar123 Feb 8, 2026
78dd00a
Merge branch 'main' of https://github.com/pytorch/rl
ParamThakkar123 Feb 12, 2026
94fe080
Merge branch 'main' of https://github.com/pytorch/rl
ParamThakkar123 Feb 13, 2026
1619008
Merge branch 'main' of https://github.com/pytorch/rl
ParamThakkar123 Feb 18, 2026
3aeaefe
Merge branch 'main' of https://github.com/pytorch/rl
ParamThakkar123 Feb 26, 2026
9c15478
Added Genesis Environments
ParamThakkar123 Feb 26, 2026
7c0d901
Updates
ParamThakkar123 Feb 26, 2026
0ee9e01
Updates
ParamThakkar123 Feb 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/unittest/linux_libs/scripts_genesis/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
channels:
- pytorch
- defaults
dependencies:
- pip
- pip:
- cloudpickle
- numpy
- pytest
- pytest-cov
- pytest-mock
- pytest-instafail
- pytest-rerunfailures
- pytest-error-for-skips
- pytest-asyncio
- expecttest
- pybind11[global]
- pyyaml
- scipy
- genesis-world
58 changes: 58 additions & 0 deletions .github/unittest/linux_libs/scripts_genesis/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/usr/bin/env bash

unset PYTORCH_VERSION

set -e

eval "$(./conda/bin/conda shell.bash hook)"
conda activate ./env

if [ "${CU_VERSION:-}" == cpu ] ; then
version="cpu"
else
if [[ ${#CU_VERSION} -eq 4 ]]; then
CUDA_VERSION="${CU_VERSION:2:1}.${CU_VERSION:3:1}"
elif [[ ${#CU_VERSION} -eq 5 ]]; then
CUDA_VERSION="${CU_VERSION:2:2}.${CU_VERSION:4:1}"
fi
echo "Using CUDA $CUDA_VERSION as determined by CU_VERSION ($CU_VERSION)"
version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")"
fi

git submodule sync && git submodule update --init --recursive

printf "Installing PyTorch with cu128"
if [[ "$TORCH_VERSION" == "nightly" ]]; then
if [ "${CU_VERSION:-}" == cpu ] ; then
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu -U
else
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu128 -U
fi
elif [[ "$TORCH_VERSION" == "stable" ]]; then
if [ "${CU_VERSION:-}" == cpu ] ; then
pip3 install torch --index-url https://download.pytorch.org/whl/cpu -U
else
pip3 install torch --index-url https://download.pytorch.org/whl/cu128 -U
fi
else
printf "Failed to install pytorch"
exit 1
fi

if [[ "$RELEASE" == 0 ]]; then
pip3 install git+https://github.com/pytorch/tensordict.git
else
pip3 install tensordict
fi

python -c "import tensordict"

printf "* Installing torchrl\n"
python -m pip install -e . --no-build-isolation

python -c "import torchrl"

printf "* Installing genesis-world\n"
pip3 install genesis-world

python -c "import genesis; print('Genesis installed successfully')"
6 changes: 6 additions & 0 deletions .github/unittest/linux_libs/scripts_genesis/post_process.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -e

eval "$(./conda/bin/conda shell.bash hook)"
conda activate ./env
29 changes: 29 additions & 0 deletions .github/unittest/linux_libs/scripts_genesis/run_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash

set -e

eval "$(./conda/bin/conda shell.bash hook)"
conda activate ./env
apt-get update && apt-get install -y git wget cmake


export PYTORCH_TEST_WITH_SLOW='1'
export LAZY_LEGACY_OP=False
python -m torch.utils.collect_env
# Avoid error: "fatal: unsafe repository"
git config --global --add safe.directory '*'

root_dir="$(git rev-parse --show-toplevel)"
env_dir="${root_dir}/env"
lib_dir="${env_dir}/lib"

# solves ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$lib_dir
export MKL_THREADING_LAYER=GNU

# this workflow only tests the libs
python -c "import genesis"

python .github/unittest/helpers/coverage_run_parallel.py -m pytest test/test_libs.py --instafail -v --durations 200 --capture no -k TestGenesis --error-for-skips
coverage combine -q
coverage xml -i
68 changes: 68 additions & 0 deletions .github/unittest/linux_libs/scripts_genesis/setup_env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/usr/bin/env bash

# This script is for setting up environment in which unit test is ran.
# To speed up the CI time, the resulting environment is cached.
#
# Do not install PyTorch and torchvision here, otherwise they also get cached.

set -e
apt-get update && apt-get upgrade -y && apt-get install -y git cmake
# Avoid error: "fatal: unsafe repository"
git config --global --add safe.directory '*'
apt-get install -y wget \
gcc \
g++ \
unzip \
curl \
patchelf \
libosmesa6-dev \
libgl1-mesa-glx \
libglfw3 \
swig3.0 \
libglew-dev \
libglvnd0 \
libgl1 \
libglx0 \
libegl1 \
libgles2 \
libglib2.0-0

# Upgrade specific package
apt-get upgrade -y libstdc++6

this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
root_dir="$(git rev-parse --show-toplevel)"
conda_dir="${root_dir}/conda"
env_dir="${root_dir}/env"

cd "${root_dir}"

case "$(uname -s)" in
Darwin*) os=MacOSX;;
*) os=Linux
esac

# 1. Install conda at ./conda
if [ ! -d "${conda_dir}" ]; then
printf "* Installing conda\n"
wget -O miniconda.sh "http://repo.continuum.io/miniconda/Miniconda3-latest-${os}-x86_64.sh"
bash ./miniconda.sh -b -f -p "${conda_dir}"
fi
eval "$(${conda_dir}/bin/conda shell.bash hook)"

# 2. Create test environment at ./env
printf "python: ${PYTHON_VERSION}\n"
if [ ! -d "${env_dir}" ]; then
printf "* Creating a test environment\n"
conda create --prefix "${env_dir}" -y python="$PYTHON_VERSION"
fi
conda activate "${env_dir}"

# 4. Install Conda dependencies
printf "* Installing dependencies (except PyTorch)\n"
echo " - python=${PYTHON_VERSION}" >> "${this_dir}/environment.yml"
cat "${this_dir}/environment.yml"

pip install pip --upgrade

conda env update --file "${this_dir}/environment.yml" --prune
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ offline-data = [
marl = ["vmas>=1.2.10", "pettingzoo>=1.24.1", "dm-meltingpot; python_version>='3.11'"]
open_spiel = ["open_spiel>=1.5"]
brax = ["jax>=0.7.0; python_version>='3.11'", "brax; python_version>='3.11'"]
genesis = ["genesis-world"]
procgen = ["procgen"]
# Base LLM dependencies (no inference backend - use llm-vllm or llm-sglang)
llm = [
Expand Down
Loading