Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
8b5fc4d
huge refactor
vmoens Nov 11, 2025
52aa42a
fix test
vmoens Nov 11, 2025
a9a986a
refactor
vmoens Nov 12, 2025
d2a5891
use id(weight)
vmoens Nov 12, 2025
e232631
clone the state_dict
vmoens Nov 12, 2025
3fd0d8e
address device mismatch
vmoens Nov 13, 2025
31098bb
fix policy with device
vmoens Nov 13, 2025
b9eb2e8
no TD state_dict
vmoens Nov 13, 2025
0af42e5
fix legacy code
vmoens Nov 13, 2025
066ae5b
fix state dict device
vmoens Nov 13, 2025
eeedff3
fix unwanted model_id
vmoens Nov 13, 2025
9852bc9
final?
vmoens Nov 13, 2025
9ad7832
final!
vmoens Nov 14, 2025
2eef1e3
fixes
vmoens Nov 15, 2025
dfc911a
amend
vmoens Nov 15, 2025
ba2bea7
amend
vmoens Nov 18, 2025
9bdff0e
intermediate-fix
vmoens Nov 25, 2025
f605a86
intermediate
vmoens Dec 1, 2025
3f5d46b
partial
vmoens Dec 1, 2025
0ca9928
fixes
vmoens Dec 1, 2025
1879704
fixes
vmoens Dec 6, 2025
22bbc33
fixes
vmoens Dec 6, 2025
d018763
amend
vmoens Dec 6, 2025
5562201
amend
vmoens Dec 6, 2025
512a5ed
edit
vmoens Dec 7, 2025
c8c24a2
edits
vmoens Dec 7, 2025
e7d5579
amend
vmoens Dec 7, 2025
dd66ea5
amend
vmoens Dec 7, 2025
6aabf2a
edits
vmoens Dec 7, 2025
52538db
edits
vmoens Dec 7, 2025
0686b28
edits
vmoens Dec 7, 2025
2768abb
edits
vmoens Dec 7, 2025
a496e3e
edits
vmoens Dec 7, 2025
ef51447
edits
vmoens Dec 7, 2025
c32d263
edits
vmoens Dec 8, 2025
238f50a
edits
vmoens Dec 8, 2025
c8be973
edits
vmoens Dec 8, 2025
f12514e
lint
vmoens Dec 8, 2025
786a6e0
edits
vmoens Dec 8, 2025
d597f8f
edits
vmoens Dec 8, 2025
1d64492
edits
vmoens Dec 8, 2025
15d2b17
edits
vmoens Dec 8, 2025
bfa578e
intermediate
vmoens Dec 9, 2025
6f40e5e
edit
vmoens Dec 11, 2025
8d85ee5
edit
vmoens Dec 11, 2025
b41935b
edit
vmoens Dec 11, 2025
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
2 changes: 1 addition & 1 deletion .github/unittest/linux/scripts/run_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export SDL_VIDEODRIVER=dummy
# legacy from bash scripts: remove?
conda env config vars set \
MAX_IDLE_COUNT=1000 \
MUJOCO_GL=$MUJOCO_GL PYOPENGL_PLATFORM=$MUJOCO_GL DISPLAY=:99 SDL_VIDEODRIVER=dummy LAZY_LEGACY_OP=False RL_LOGGING_LEVEL=DEBUG TOKENIZERS_PARALLELISM=true
MUJOCO_GL=$MUJOCO_GL PYOPENGL_PLATFORM=$MUJOCO_GL DISPLAY=:99 SDL_VIDEODRIVER=dummy LAZY_LEGACY_OP=False RL_LOGGING_LEVEL=INFO TOKENIZERS_PARALLELISM=true

pip3 install pip --upgrade
pip install virtualenv
Expand Down
41 changes: 35 additions & 6 deletions .github/unittest/linux_sota/scripts/run_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ if [ ! -d "${env_dir}" ]; then
fi
conda activate "${env_dir}"

# Verify we have CPython, not PyPy
python_impl=$(python -c "import platform; print(platform.python_implementation())")
if [ "$python_impl" != "CPython" ]; then
echo "ERROR: Expected CPython but got $python_impl"
echo "Python executable: $(which python)"
echo "Python version: $(python --version)"
exit 1
fi
printf "* Verified Python implementation: %s\n" "$python_impl"

# 3. Install mujoco
printf "* Installing mujoco and related\n"
mkdir -p $root_dir/.mujoco
Expand All @@ -64,7 +74,10 @@ cd "${root_dir}"

# 4. Install Conda dependencies
printf "* Installing dependencies (except PyTorch)\n"
echo " - python=${PYTHON_VERSION}" >> "${this_dir}/environment.yml"
# Add python version to environment.yml if not already present (idempotent)
if ! grep -q "python=${PYTHON_VERSION}" "${this_dir}/environment.yml"; then
echo " - python=${PYTHON_VERSION}" >> "${this_dir}/environment.yml"
fi
cat "${this_dir}/environment.yml"

export MUJOCO_PY_MUJOCO_PATH=$root_dir/.mujoco/mujoco210
Expand Down Expand Up @@ -100,11 +113,27 @@ pip install git+https://github.com/Farama-Foundation/d4rl@master#egg=d4rl

# TODO: move this down -- will break torchrl installation
conda install -y -c conda-forge libstdcxx-ng=12
## find libstdc
STDC_LOC=$(find conda/ -name "libstdc++.so.6" | head -1)
conda env config vars set \
MAX_IDLE_COUNT=1000 \
LD_PRELOAD=${root_dir}/$STDC_LOC TOKENIZERS_PARALLELISM=true
## find libstdc - search in the env's lib directory first, then fall back to conda packages
STDC_LOC=$(find "${env_dir}/lib" -name "libstdc++.so.6" 2>/dev/null | head -1)
if [ -z "$STDC_LOC" ]; then
# Fall back to searching in conda packages for libstdcxx-ng specifically
STDC_LOC=$(find conda/pkgs -path "*libstdcxx*" -name "libstdc++.so.6" 2>/dev/null | head -1)
fi
if [ -z "$STDC_LOC" ]; then
echo "WARNING: Could not find libstdc++.so.6, skipping LD_PRELOAD"
conda env config vars set \
MAX_IDLE_COUNT=1000 \
TOKENIZERS_PARALLELISM=true
else
echo "Found libstdc++ at: $STDC_LOC"
conda env config vars set \
MAX_IDLE_COUNT=1000 \
LD_PRELOAD=${STDC_LOC} TOKENIZERS_PARALLELISM=true
fi

# Reactivate environment to apply the new env vars
conda deactivate
conda activate "${env_dir}"

# compile mujoco-py (bc it's done at runtime for whatever reason someone thought it was a good idea)
python -c """import gym;import d4rl"""
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/ecosystem/gym_env_throughput.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
)
from torchrl.envs import EnvCreator, GymEnv, ParallelEnv
from torchrl.envs.libs.gym import gym_backend as gym_bc, set_gym_backend
from torchrl.envs.utils import RandomPolicy
from torchrl.modules import RandomPolicy

if __name__ == "__main__":
avail_devices = ("cpu",)
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/storage/benchmark_sample_latency_over_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def __init__(self, capacity: int):
rank = args.rank
storage_type = args.storage

torchrl_logger.info(f"Rank: {rank}; Storage: {storage_type}")
torchrl_logger.debug(f"RANK: {rank}; Storage: {storage_type}")

os.environ["MASTER_ADDR"] = "localhost"
os.environ["MASTER_PORT"] = "29500"
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/test_collectors_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from torchrl.data.utils import CloudpickleWrapper
from torchrl.envs import EnvCreator, GymEnv, ParallelEnv, StepCounter, TransformedEnv
from torchrl.envs.libs.dm_control import DMControlEnv
from torchrl.envs.utils import RandomPolicy
from torchrl.modules import RandomPolicy


def single_collector_setup():
Expand Down
Loading
Loading