Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
2d87abe
update version
vmoens Feb 1, 2024
0af176f
[Doc] Fix tutos (#1863)
Feb 2, 2024
ba804ab
[BugFix] Fix load_state_dict and is_empty td bugfix impact (#1869)
Feb 4, 2024
49449a6
[BugFix] better device consistency in EGreedy (#1867)
Feb 4, 2024
12c8a49
[Doc] Installation instructions in API ref (#1871)
Feb 5, 2024
cd2c50f
[BugFix] Fix update in serial / parallel env (#1866)
Feb 5, 2024
518b92c
[BugFix] check_env_specs seeding logic (#1872)
Feb 5, 2024
203515a
[BugFix] Fix a bug in SliceSampler, indexes outside sampler lengths w…
vladisai Feb 6, 2024
898f6ec
[BugFix] state typo in RNG control module (#1878)
Feb 6, 2024
ca1cca9
[BugFix] Fix _reset data passing in parallel env (#1880)
Feb 6, 2024
a7b359a
[Doc] Improve PrioritizedSampler doc and get rid of np dependency as …
Feb 7, 2024
6bd9296
[BugFix] Use traj_terminated in SliceSampler (#1884)
Cadene Feb 7, 2024
cfecd6f
[Doc] Getting started tutos (#1886)
Feb 10, 2024
1f57a2b
Update getting-started-5.py (#1894)
Feb 10, 2024
7eafe19
[BugFix] Solve recursion issue in losses hook (#1897)
Feb 10, 2024
c75a7b7
[BugFix] Fix exploration in losses (#1898)
Feb 11, 2024
a543415
[BugFix] Fix flaky rb tests (#1901)
Feb 12, 2024
bf5d53a
[BugFix] Adaptable non-blocking for mps and non cuda device in batche…
Feb 12, 2024
8dc96cf
[Minor] Remove warnings in test_cost (#1902)
Feb 12, 2024
7355623
[BugFix] Make KL-controllers independent of the model (#1903)
Feb 12, 2024
9119439
[BugFix] Fix Ray collector example error (#1908)
albertbou92 Feb 15, 2024
52161f1
[BugFix] Use setdefault in _cache_values (#1910)
Feb 15, 2024
24d7391
[BugFix] Non exclusive terminated and truncated (#1911)
Feb 15, 2024
2ed996c
[BugFix] Make sure ParallelEnv does not overflow mem when policy requ…
Feb 15, 2024
2bfbc51
Fix onw typo (#1917)
kit1980 Feb 16, 2024
3630c36
[BugFix] Fix KLPENPPOLoss KL computation (#1922)
Feb 17, 2024
1435f7b
[BugFix] Fix OOB TruncatedNormal LP (#1924)
Feb 17, 2024
5e5c19e
[BugFix, Performance] Fewer imports at root (#1930)
Feb 19, 2024
8b3f77b
[BugFix] fix trunc normal device (#1931)
Feb 20, 2024
e6ab9c0
[BugFix] No grad on collector reset (#1927)
matteobettini Feb 20, 2024
97965cf
[BugFix] Fix replay buffer extension with lists (#1937)
Feb 20, 2024
4723747
[Minor] Add env.shape attribute (#1938)
Feb 20, 2024
8c506b9
[BugFix] Fix env.shape regex matches (#1940)
Feb 20, 2024
1187fc5
[BugFix] Fix habitat (#1941)
Feb 20, 2024
bc95cbb
[BugFix] Fix multiple context syntax in multiagent examples (#1943)
matteobettini Feb 21, 2024
ff2e265
[BugFix] Vmap randomness for value estimator (#1942)
BY571 Feb 21, 2024
5e03a4c
[BugFix] Remove reset on last step of a rollout (#1936)
matteobettini Feb 21, 2024
ad02db6
[BugFix] Fix examples (#1945)
Feb 21, 2024
fb3d8cc
[BugFix] Update cql docstring example (#1951)
BY571 Feb 22, 2024
bfb4037
[BugFix] Update iql docstring example (#1950)
BY571 Feb 22, 2024
9987d92
[BugFix] Fix batch-size expansion in functionalization (#1959)
Feb 23, 2024
8cb1ee1
[BugFix] Fix offline CatFrames (#1953)
Feb 24, 2024
f078fcd
[BugFix] Fix offline CatFrames for pixels (#1964)
Feb 25, 2024
ce58033
[BugFix] Fixed import for importlib (#1914)
DanilBaibak Feb 25, 2024
f7cfc48
[Minor] Use the main branch for the M1 build wheels (#1965)
DanilBaibak Feb 25, 2024
3ba16f6
[Refactor] Remove remnant legacy functional calls (#1973)
Feb 27, 2024
c0bf069
amend
vmoens Feb 28, 2024
55e65af
test
vmoens Feb 28, 2024
2979072
fixes
vmoens Feb 28, 2024
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/scripts/m1_script.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

export BUILD_VERSION=0.3.0
export BUILD_VERSION=0.3.1

${CONDA_RUN} pip install git+https://github.com/pytorch/tensordict.git -U
14 changes: 9 additions & 5 deletions .github/unittest/linux/scripts/run_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,15 @@ git submodule sync && git submodule update --init --recursive
printf "Installing PyTorch with %s\n" "${CU_VERSION}"
if [[ "$TORCH_VERSION" == "nightly" ]]; then
if [ "${CU_VERSION:-}" == cpu ] ; then
pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U
else
pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/$CU_VERSION
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/$CU_VERSION
fi
elif [[ "$TORCH_VERSION" == "stable" ]]; then
if [ "${CU_VERSION:-}" == cpu ] ; then
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpu
else
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/$CU_VERSION
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/$CU_VERSION
fi
else
printf "Failed to install pytorch"
Expand All @@ -150,7 +150,11 @@ else
fi

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

printf "* Installing torchrl\n"
python setup.py develop
Expand Down
24 changes: 19 additions & 5 deletions .github/unittest/linux_distributed/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,21 @@ fi
# submodules
git submodule sync && git submodule update --init --recursive

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

# smoke test
Expand All @@ -40,7 +50,11 @@ python -c "import functorch"
pip install git+https://github.com/pytorch/torchsnapshot

# install tensordict
pip install git+https://github.com/pytorch/tensordict.git
if [[ "$TORCH_VERSION" == "nightly" ]]; then
pip3 install git+https://github.com/pytorch/tensordict.git
else
pip3 install tensordict
fi

printf "* Installing torchrl\n"
python setup.py develop
8 changes: 6 additions & 2 deletions .github/unittest/linux_examples/scripts/run_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")"
git submodule sync && git submodule update --init --recursive

printf "Installing PyTorch with %s\n" "${CU_VERSION}"
pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/$CU_VERSION
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/$CU_VERSION

# smoke test
python -c "import functorch"
Expand All @@ -157,7 +157,11 @@ python -c "import functorch"
pip install git+https://github.com/pytorch/torchsnapshot

# install tensordict
pip install git+https://github.com/pytorch/tensordict.git
if [[ "$TORCH_VERSION" == "nightly" ]]; then
pip3 install git+https://github.com/pytorch/tensordict.git
else
pip3 install tensordict
fi

printf "* Installing torchrl\n"
python setup.py develop
Expand Down
28 changes: 20 additions & 8 deletions .github/unittest/linux_libs/scripts_ataridqn/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,30 @@ fi
# submodules
git submodule sync && git submodule update --init --recursive

printf "Installing PyTorch with %s\n" "${CU_VERSION}"
if [ "${CU_VERSION:-}" == cpu ] ; then
# conda install -y pytorch torchvision cpuonly -c pytorch-nightly
# use pip to install pytorch as conda can frequently pick older release
# conda install -y pytorch cpuonly -c pytorch-nightly
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu
printf "Installing PyTorch with cu121"
if [[ "$TORCH_VERSION" == "nightly" ]]; then
if [ "${CU_VERSION:-}" == cpu ] ; then
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U
else
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu121 -U
fi
elif [[ "$TORCH_VERSION" == "stable" ]]; then
if [ "${CU_VERSION:-}" == cpu ] ; then
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpu
else
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu121
fi
else
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu121
printf "Failed to install pytorch"
exit 1
fi

# install tensordict
pip install git+https://github.com/pytorch/tensordict.git
if [[ "$TORCH_VERSION" == "nightly" ]]; then
pip3 install git+https://github.com/pytorch/tensordict.git
else
pip3 install tensordict
fi

# smoke test
python -c "import functorch;import tensordict"
Expand Down
22 changes: 15 additions & 7 deletions .github/unittest/linux_libs/scripts_brax/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,22 @@ fi
# submodules
git submodule sync && git submodule update --init --recursive

printf "Installing PyTorch with %s\n" "${CU_VERSION}"
if [ "${CU_VERSION:-}" == cpu ] ; then
# conda install -y pytorch torchvision cpuonly -c pytorch-nightly
# use pip to install pytorch as conda can frequently pick older release
# conda install -y pytorch cpuonly -c pytorch-nightly
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall --progress-bar off
printf "Installing PyTorch with cu121"
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/cu121 -U
fi
elif [[ "$TORCH_VERSION" == "stable" ]]; then
if [ "${CU_VERSION:-}" == cpu ] ; then
pip3 install torch --index-url https://download.pytorch.org/whl/cpu
else
pip3 install torch --index-url https://download.pytorch.org/whl/cu121
fi
else
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 --force-reinstall --progress-bar off
printf "Failed to install pytorch"
exit 1
fi

# install tensordict
Expand Down
28 changes: 20 additions & 8 deletions .github/unittest/linux_libs/scripts_d4rl/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,30 @@ fi
# submodules
git submodule sync && git submodule update --init --recursive

printf "Installing PyTorch with %s\n" "${CU_VERSION}"
if [ "${CU_VERSION:-}" == cpu ] ; then
# conda install -y pytorch torchvision cpuonly -c pytorch-nightly
# use pip to install pytorch as conda can frequently pick older release
# conda install -y pytorch cpuonly -c pytorch-nightly
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall
printf "Installing PyTorch with cu121"
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/cu121 -U
fi
elif [[ "$TORCH_VERSION" == "stable" ]]; then
if [ "${CU_VERSION:-}" == cpu ] ; then
pip3 install torch --index-url https://download.pytorch.org/whl/cpu
else
pip3 install torch --index-url https://download.pytorch.org/whl/cu121
fi
else
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 --force-reinstall
printf "Failed to install pytorch"
exit 1
fi

# install tensordict
pip install git+https://github.com/pytorch/tensordict.git
if [[ "$TORCH_VERSION" == "nightly" ]]; then
pip3 install git+https://github.com/pytorch/tensordict.git
else
pip3 install tensordict
fi

# smoke test
python -c "import functorch;import tensordict"
Expand Down
6 changes: 3 additions & 3 deletions .github/unittest/linux_libs/scripts_envpool/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ fi
# submodules
git submodule sync && git submodule update --init --recursive

printf "Installing PyTorch with %s\n" "${CU_VERSION}"
printf "Installing PyTorch with cu121"
if [ "${CU_VERSION:-}" == cpu ] ; then
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
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/cu118
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 -U
fi

# smoke test
Expand Down
28 changes: 20 additions & 8 deletions .github/unittest/linux_libs/scripts_gen-dgrl/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,30 @@ fi
# submodules
git submodule sync && git submodule update --init --recursive

printf "Installing PyTorch with %s\n" "${CU_VERSION}"
if [ "${CU_VERSION:-}" == cpu ] ; then
# conda install -y pytorch torchvision cpuonly -c pytorch-nightly
# use pip to install pytorch as conda can frequently pick older release
# conda install -y pytorch cpuonly -c pytorch-nightly
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu
printf "Installing PyTorch with cu121"
if [[ "$TORCH_VERSION" == "nightly" ]]; then
if [ "${CU_VERSION:-}" == cpu ] ; then
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U
else
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu121 -U
fi
elif [[ "$TORCH_VERSION" == "stable" ]]; then
if [ "${CU_VERSION:-}" == cpu ] ; then
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpu
else
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu121
fi
else
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu121
printf "Failed to install pytorch"
exit 1
fi

# install tensordict
pip install git+https://github.com/pytorch/tensordict.git
if [[ "$TORCH_VERSION" == "nightly" ]]; then
pip3 install git+https://github.com/pytorch/tensordict.git
else
pip3 install tensordict
fi

# smoke test
python -c "import functorch;import tensordict"
Expand Down
20 changes: 16 additions & 4 deletions .github/unittest/linux_libs/scripts_gym/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,32 @@ git submodule sync && git submodule update --init --recursive

printf "Installing PyTorch with %s\n" "${CU_VERSION}"
if [ "${CU_VERSION:-}" == cpu ] ; then
conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 cpuonly -c pytorch
conda install pytorch==1.13.1 torchvision==0.14.1 cpuonly -c pytorch
else
conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.6 -c pytorch -c nvidia -y
conda install pytorch==1.13.1 torchvision==0.14.1 pytorch-cuda=11.6 -c pytorch -c nvidia -y
fi

# Solving circular import: https://stackoverflow.com/questions/75501048/how-to-fix-attributeerror-partially-initialized-module-charset-normalizer-has
pip install -U --force-reinstall charset-normalizer
pip install -U charset-normalizer

# install tensordict
pip install git+https://github.com/pytorch/tensordict.git
if [[ "$TORCH_VERSION" == "nightly" ]]; then
pip3 install git+https://github.com/pytorch/tensordict.git
else
pip3 install tensordict
fi

# smoke test
python -c "import tensordict"

printf "* Installing torchrl\n"
python setup.py develop
python -c "import torchrl"

## Reinstalling pytorch with specific version
#printf "Re-installing PyTorch with %s\n" "${CU_VERSION}"
#if [ "${CU_VERSION:-}" == cpu ] ; then
# conda install pytorch==1.13.1 torchvision==0.14.1 cpuonly -c pytorch
#else
# conda install pytorch==1.13.1 torchvision==0.14.1 pytorch-cuda=11.6 -c pytorch -c nvidia -y
#fi
13 changes: 11 additions & 2 deletions .github/unittest/linux_libs/scripts_habitat/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,19 @@ version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")"
git submodule sync && git submodule update --init --recursive

printf "Installing PyTorch with %s\n" "${CU_VERSION}"
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 --force-reinstall
if [[ "$TORCH_VERSION" == "nightly" ]]; then
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 -U
elif [[ "$TORCH_VERSION" == "stable" ]]; then
pip3 install torch --index-url https://download.pytorch.org/whl/cu121
fi

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

# smoke test
python3 -c "import functorch;import tensordict"
Expand Down
5 changes: 3 additions & 2 deletions .github/unittest/linux_libs/scripts_habitat/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ pip install pip --upgrade

conda env update --file "${this_dir}/environment.yml" --prune

conda install habitat-sim withbullet headless -c conda-forge -c aihabitat-nightly -y
conda run python -m pip install git+https://github.com/facebookresearch/habitat-lab.git#subdirectory=habitat-lab
#conda install habitat-sim withbullet headless -c conda-forge -c aihabitat -y
conda install habitat-sim withbullet headless -c conda-forge -c aihabitat -y
conda run python -m pip install git+https://github.com/facebookresearch/habitat-lab.git@stable#subdirectory=habitat-lab
#conda run python -m pip install git+https://github.com/facebookresearch/habitat-lab.git#subdirectory=habitat-baselines
conda run python -m pip install "gym[atari,accept-rom-license]" pygame
28 changes: 20 additions & 8 deletions .github/unittest/linux_libs/scripts_jumanji/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,30 @@ fi
# submodules
git submodule sync && git submodule update --init --recursive

printf "Installing PyTorch with %s\n" "${CU_VERSION}"
if [ "${CU_VERSION:-}" == cpu ] ; then
# conda install -y pytorch torchvision cpuonly -c pytorch-nightly
# use pip to install pytorch as conda can frequently pick older release
# conda install -y pytorch cpuonly -c pytorch-nightly
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall
printf "Installing PyTorch with cu121"
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/cu121 -U
fi
elif [[ "$TORCH_VERSION" == "stable" ]]; then
if [ "${CU_VERSION:-}" == cpu ] ; then
pip3 install torch --index-url https://download.pytorch.org/whl/cpu
else
pip3 install torch --index-url https://download.pytorch.org/whl/cu121
fi
else
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 --force-reinstall
printf "Failed to install pytorch"
exit 1
fi

# install tensordict
pip install git+https://github.com/pytorch/tensordict.git
if [[ "$TORCH_VERSION" == "nightly" ]]; then
pip3 install git+https://github.com/pytorch/tensordict.git
else
pip3 install tensordict
fi

# smoke test
python -c "import functorch;import tensordict"
Expand Down
Loading