From 329f50c26afb1a0cb05ea46dfb045d596e596072 Mon Sep 17 00:00:00 2001 From: vmoens Date: Thu, 5 Oct 2023 15:38:46 +0100 Subject: [PATCH 1/8] init --- .github/workflows/wheels.yml | 8 ++--- README.md | 1 + setup.py | 57 ++++++++++++++++++++---------------- version.txt | 2 +- 4 files changed, 37 insertions(+), 31 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index ca3075e7baa..8d10f94e432 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -4,7 +4,7 @@ on: types: [opened, synchronize, reopened] push: branches: - - release/0.1.1 + - release/0.2.0 concurrency: # Documentation suggests ${{ github.head_ref }}, but that's only available on pull_request/pull_request_target triggers, so using ${{ github.ref }}. @@ -32,7 +32,7 @@ jobs: run: | export PATH="/opt/python/${{ matrix.python_version[1] }}/bin:$PATH" python3 -mpip install wheel - BUILD_VERSION=0.1.1 python3 setup.py bdist_wheel + BUILD_VERSION=0.2.0 python3 setup.py bdist_wheel # NB: wheels have the linux_x86_64 tag so we rename to manylinux1 # find . -name 'dist/*whl' -exec bash -c ' mv $0 ${0/linux/manylinux1}' {} \; # pytorch/pytorch binaries are also manylinux_2_17 compliant but they @@ -72,7 +72,7 @@ jobs: run: | export CC=clang CXX=clang++ python3 -mpip install wheel - BUILD_VERSION=0.1.1 python3 setup.py bdist_wheel + BUILD_VERSION=0.2.0 python3 setup.py bdist_wheel - name: Upload wheel for the test-wheel job uses: actions/upload-artifact@v2 with: @@ -104,7 +104,7 @@ jobs: shell: bash run: | python3 -mpip install wheel - BUILD_VERSION=0.1.1 python3 setup.py bdist_wheel + BUILD_VERSION=0.2.0 python3 setup.py bdist_wheel - name: Upload wheel for the test-wheel job uses: actions/upload-artifact@v2 with: diff --git a/README.md b/README.md index aacfd0930b4..299c8730454 100644 --- a/README.md +++ b/README.md @@ -499,6 +499,7 @@ A series of [examples](examples/) are provided with an illustrative purpose: - [SAC](examples/sac/sac.py) - [REDQ](examples/redq/redq.py) - [Dreamer](examples/dreamer/dreamer.py) +- [RLHF](examples/rlhf) and many more to come! diff --git a/setup.py b/setup.py index 20f63bb3064..2d768354bb1 100644 --- a/setup.py +++ b/setup.py @@ -169,7 +169,7 @@ def _main(argv): if is_nightly: tensordict_dep = "tensordict-nightly" else: - tensordict_dep = "tensordict>=0.1.1" + tensordict_dep = "tensordict>=0.2.0" if is_nightly: version = get_nightly_version() @@ -189,6 +189,35 @@ def _main(argv): long_description = (this_directory / "README.md").read_text() sys.argv = [sys.argv[0]] + unknown + extra_requires = { + "atari": [ + "gym", + "atari-py", + "ale-py", + "gym[accept-rom-license]", + "pygame", + ], + "dm_control": ["dm_control"], + "gym_continuous": ["gymnasium", "mujoco"], + "rendering": ["moviepy"], + "tests": ["pytest", "pyyaml", "pytest-instafail", "scipy"], + "utils": [ + "tensorboard", + "wandb", + "tqdm", + "hydra-core>=1.1", + "hydra-submitit-launcher", + "git", + ], + "checkpointing": [ + "torchsnapshot", + ], + "marl": ["vmas>=1.2.10", "pettingzoo>=1.24.1"], + } + extra_requires["all"] = set() + for key in list(extra_requires.keys()): + extra_requires["all"] = extra_requires["all"].union(extra_requires[key]) + extra_requires["all"] = sorted(extra_requires["all"]) setup( # Metadata name=name, @@ -213,31 +242,7 @@ def _main(argv): "cloudpickle", tensordict_dep, ], - extras_require={ - "atari": [ - "gym<=0.24", - "atari-py", - "ale-py", - "gym[accept-rom-license]", - "pygame", - ], - "dm_control": ["dm_control"], - "gym_continuous": ["mujoco-py", "mujoco"], - "rendering": ["moviepy"], - "tests": ["pytest", "pyyaml", "pytest-instafail", "scipy"], - "utils": [ - "tensorboard", - "wandb", - "tqdm", - "hydra-core>=1.1", - "hydra-submitit-launcher", - "git", - ], - "checkpointing": [ - "torchsnapshot", - ], - "marl": ["vmas>=1.2.10", "pettingzoo>=1.24.1"], - }, + extras_require=extra_requires, zip_safe=False, classifiers=[ "Programming Language :: Python :: 3.8", diff --git a/version.txt b/version.txt index 17e51c385ea..0ea3a944b39 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.1.1 +0.2.0 From 258e0e14bbe7a6215cd0590638bfe77c6624accf Mon Sep 17 00:00:00 2001 From: vmoens Date: Thu, 5 Oct 2023 15:39:58 +0100 Subject: [PATCH 2/8] amend --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 299c8730454..517511e8ea1 100644 --- a/README.md +++ b/README.md @@ -493,12 +493,14 @@ A series of [examples](examples/) are provided with an illustrative purpose: - [DQN and Rainbow](examples/dqn/dqn.py) - [DDPG](examples/ddpg/ddpg.py) - [IQL](examples/iql/iql.py) +- [CQL](examples/iql/cql.py) - [TD3](examples/td3/td3.py) - [A2C](examples/a2c_old/a2c.py) - [PPO](examples/ppo/ppo.py) - [SAC](examples/sac/sac.py) - [REDQ](examples/redq/redq.py) - [Dreamer](examples/dreamer/dreamer.py) +- [Decision Transformers](examples/decision_transformer) - [RLHF](examples/rlhf) and many more to come! From 7aefa87011ceba0e1893b228055607640d1e6623 Mon Sep 17 00:00:00 2001 From: vmoens Date: Thu, 5 Oct 2023 15:41:56 +0100 Subject: [PATCH 3/8] amend --- .github/unittest/linux/scripts/run_all.sh | 2 +- .github/unittest/linux_distributed/scripts/install.sh | 2 +- .github/unittest/linux_examples/scripts/run_all.sh | 2 +- .github/unittest/linux_libs/scripts_brax/install.sh | 2 +- .github/unittest/linux_libs/scripts_d4rl/install.sh | 2 +- .github/unittest/linux_libs/scripts_envpool/install.sh | 2 +- .github/unittest/linux_libs/scripts_gym/install.sh | 2 +- .github/unittest/linux_libs/scripts_habitat/install.sh | 2 +- .github/unittest/linux_libs/scripts_jumanji/install.sh | 2 +- .../unittest/linux_libs/scripts_pettingzoo/install.sh | 2 +- .github/unittest/linux_libs/scripts_rlhf/install.sh | 2 +- .../scripts_robohive/install_and_run_test.sh | 2 +- .github/unittest/linux_libs/scripts_sklearn/install.sh | 2 +- .github/unittest/linux_libs/scripts_smacv2/install.sh | 2 +- .github/unittest/linux_libs/scripts_vmas/install.sh | 2 +- .../unittest/linux_olddeps/scripts_gym_0_13/install.sh | 2 +- .github/unittest/linux_optdeps/scripts/install.sh | 2 +- .github/unittest/windows_optdepts/scripts/install.sh | 2 +- .github/workflows/benchmarks.yml | 4 ++-- .github/workflows/benchmarks_pr.yml | 4 ++-- .github/workflows/docs.yml | 4 ++-- .github/workflows/nightly_build.yml | 6 +++--- .github/workflows/wheels.yml | 4 ++-- CONTRIBUTING.md | 2 +- README.md | 10 +++++----- docs/source/conf.py | 2 +- 26 files changed, 36 insertions(+), 36 deletions(-) diff --git a/.github/unittest/linux/scripts/run_all.sh b/.github/unittest/linux/scripts/run_all.sh index 35bb2b21764..67b7be9ef40 100755 --- a/.github/unittest/linux/scripts/run_all.sh +++ b/.github/unittest/linux/scripts/run_all.sh @@ -146,7 +146,7 @@ python -c "import functorch" pip3 install git+https://github.com/pytorch/torchsnapshot # install tensordict -pip3 install git+https://github.com/pytorch-labs/tensordict.git +pip3 install git+https://github.com/pytorch/tensordict.git printf "* Installing torchrl\n" python setup.py develop diff --git a/.github/unittest/linux_distributed/scripts/install.sh b/.github/unittest/linux_distributed/scripts/install.sh index d0f3f7a132e..e8ee50df939 100755 --- a/.github/unittest/linux_distributed/scripts/install.sh +++ b/.github/unittest/linux_distributed/scripts/install.sh @@ -40,7 +40,7 @@ python -c "import functorch" pip install git+https://github.com/pytorch/torchsnapshot # install tensordict -pip install git+https://github.com/pytorch-labs/tensordict.git +pip install git+https://github.com/pytorch/tensordict.git printf "* Installing torchrl\n" python setup.py develop diff --git a/.github/unittest/linux_examples/scripts/run_all.sh b/.github/unittest/linux_examples/scripts/run_all.sh index 02fd5cadc4a..34cde2bfc3a 100755 --- a/.github/unittest/linux_examples/scripts/run_all.sh +++ b/.github/unittest/linux_examples/scripts/run_all.sh @@ -155,7 +155,7 @@ python -c "import functorch" pip install git+https://github.com/pytorch/torchsnapshot # install tensordict -pip install git+https://github.com/pytorch-labs/tensordict.git +pip install git+https://github.com/pytorch/tensordict.git printf "* Installing torchrl\n" python setup.py develop diff --git a/.github/unittest/linux_libs/scripts_brax/install.sh b/.github/unittest/linux_libs/scripts_brax/install.sh index 1b3f34cb0bd..a06302b7f12 100755 --- a/.github/unittest/linux_libs/scripts_brax/install.sh +++ b/.github/unittest/linux_libs/scripts_brax/install.sh @@ -36,7 +36,7 @@ else fi # install tensordict -pip install git+https://github.com/pytorch-labs/tensordict.git --progress-bar off +pip install git+https://github.com/pytorch/tensordict.git --progress-bar off # smoke test python -c "import functorch;import tensordict" diff --git a/.github/unittest/linux_libs/scripts_d4rl/install.sh b/.github/unittest/linux_libs/scripts_d4rl/install.sh index 437900b3323..b9d333e4fbd 100755 --- a/.github/unittest/linux_libs/scripts_d4rl/install.sh +++ b/.github/unittest/linux_libs/scripts_d4rl/install.sh @@ -39,7 +39,7 @@ else fi # install tensordict -pip install git+https://github.com/pytorch-labs/tensordict.git +pip install git+https://github.com/pytorch/tensordict.git # smoke test python -c "import functorch;import tensordict" diff --git a/.github/unittest/linux_libs/scripts_envpool/install.sh b/.github/unittest/linux_libs/scripts_envpool/install.sh index 5899209cc46..fbc56587584 100755 --- a/.github/unittest/linux_libs/scripts_envpool/install.sh +++ b/.github/unittest/linux_libs/scripts_envpool/install.sh @@ -37,7 +37,7 @@ fi python -c "import functorch" # install tensordict -pip install git+https://github.com/pytorch-labs/tensordict +pip install git+https://github.com/pytorch/tensordict printf "* Installing torchrl\n" python setup.py develop diff --git a/.github/unittest/linux_libs/scripts_gym/install.sh b/.github/unittest/linux_libs/scripts_gym/install.sh index 959269c1b16..718e4f37e3a 100755 --- a/.github/unittest/linux_libs/scripts_gym/install.sh +++ b/.github/unittest/linux_libs/scripts_gym/install.sh @@ -46,7 +46,7 @@ fi pip install -U --force-reinstall charset-normalizer # install tensordict -pip install git+https://github.com/pytorch-labs/tensordict.git +pip install git+https://github.com/pytorch/tensordict.git # smoke test python -c "import tensordict" diff --git a/.github/unittest/linux_libs/scripts_habitat/install.sh b/.github/unittest/linux_libs/scripts_habitat/install.sh index 82170d7fd8b..ceef527d8e0 100755 --- a/.github/unittest/linux_libs/scripts_habitat/install.sh +++ b/.github/unittest/linux_libs/scripts_habitat/install.sh @@ -23,7 +23,7 @@ printf "Installing PyTorch with %s\n" "${CU_VERSION}" pip3 install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall # install tensordict -pip3 install git+https://github.com/pytorch-labs/tensordict.git +pip3 install git+https://github.com/pytorch/tensordict.git # smoke test python3 -c "import functorch;import tensordict" diff --git a/.github/unittest/linux_libs/scripts_jumanji/install.sh b/.github/unittest/linux_libs/scripts_jumanji/install.sh index 91671e8d985..954b8869abf 100755 --- a/.github/unittest/linux_libs/scripts_jumanji/install.sh +++ b/.github/unittest/linux_libs/scripts_jumanji/install.sh @@ -36,7 +36,7 @@ else fi # install tensordict -pip install git+https://github.com/pytorch-labs/tensordict.git +pip install git+https://github.com/pytorch/tensordict.git # smoke test python -c "import functorch;import tensordict" diff --git a/.github/unittest/linux_libs/scripts_pettingzoo/install.sh b/.github/unittest/linux_libs/scripts_pettingzoo/install.sh index cb36c7cc48a..e363968f0e8 100755 --- a/.github/unittest/linux_libs/scripts_pettingzoo/install.sh +++ b/.github/unittest/linux_libs/scripts_pettingzoo/install.sh @@ -36,7 +36,7 @@ else fi # install tensordict -pip install git+https://github.com/pytorch-labs/tensordict.git +pip install git+https://github.com/pytorch/tensordict.git # smoke test python -c "import tensordict" diff --git a/.github/unittest/linux_libs/scripts_rlhf/install.sh b/.github/unittest/linux_libs/scripts_rlhf/install.sh index 76c10f36e6c..6464c6d5915 100755 --- a/.github/unittest/linux_libs/scripts_rlhf/install.sh +++ b/.github/unittest/linux_libs/scripts_rlhf/install.sh @@ -39,7 +39,7 @@ else fi # install tensordict -pip install git+https://github.com/pytorch-labs/tensordict.git +pip install git+https://github.com/pytorch/tensordict.git # smoke test python -c "import tensordict" diff --git a/.github/unittest/linux_libs/scripts_robohive/install_and_run_test.sh b/.github/unittest/linux_libs/scripts_robohive/install_and_run_test.sh index 08548f9a4bf..4014690944f 100755 --- a/.github/unittest/linux_libs/scripts_robohive/install_and_run_test.sh +++ b/.github/unittest/linux_libs/scripts_robohive/install_and_run_test.sh @@ -47,7 +47,7 @@ else fi # install tensordict -pip install git+https://github.com/pytorch-labs/tensordict.git +pip install git+https://github.com/pytorch/tensordict.git # smoke test python -c "import tensordict" diff --git a/.github/unittest/linux_libs/scripts_sklearn/install.sh b/.github/unittest/linux_libs/scripts_sklearn/install.sh index 437900b3323..b9d333e4fbd 100755 --- a/.github/unittest/linux_libs/scripts_sklearn/install.sh +++ b/.github/unittest/linux_libs/scripts_sklearn/install.sh @@ -39,7 +39,7 @@ else fi # install tensordict -pip install git+https://github.com/pytorch-labs/tensordict.git +pip install git+https://github.com/pytorch/tensordict.git # smoke test python -c "import functorch;import tensordict" diff --git a/.github/unittest/linux_libs/scripts_smacv2/install.sh b/.github/unittest/linux_libs/scripts_smacv2/install.sh index cb36c7cc48a..e363968f0e8 100755 --- a/.github/unittest/linux_libs/scripts_smacv2/install.sh +++ b/.github/unittest/linux_libs/scripts_smacv2/install.sh @@ -36,7 +36,7 @@ else fi # install tensordict -pip install git+https://github.com/pytorch-labs/tensordict.git +pip install git+https://github.com/pytorch/tensordict.git # smoke test python -c "import tensordict" diff --git a/.github/unittest/linux_libs/scripts_vmas/install.sh b/.github/unittest/linux_libs/scripts_vmas/install.sh index cb36c7cc48a..e363968f0e8 100755 --- a/.github/unittest/linux_libs/scripts_vmas/install.sh +++ b/.github/unittest/linux_libs/scripts_vmas/install.sh @@ -36,7 +36,7 @@ else fi # install tensordict -pip install git+https://github.com/pytorch-labs/tensordict.git +pip install git+https://github.com/pytorch/tensordict.git # smoke test python -c "import tensordict" diff --git a/.github/unittest/linux_olddeps/scripts_gym_0_13/install.sh b/.github/unittest/linux_olddeps/scripts_gym_0_13/install.sh index fc29520cb85..f55daf8e8ce 100755 --- a/.github/unittest/linux_olddeps/scripts_gym_0_13/install.sh +++ b/.github/unittest/linux_olddeps/scripts_gym_0_13/install.sh @@ -46,7 +46,7 @@ fi pip install -U --force-reinstall charset-normalizer # install tensordict -pip install git+https://github.com/pytorch-labs/tensordict.git +pip install git+https://github.com/pytorch/tensordict.git # smoke test python -c "import tensordict" diff --git a/.github/unittest/linux_optdeps/scripts/install.sh b/.github/unittest/linux_optdeps/scripts/install.sh index 6a4cb8b0732..74c0cf27d32 100755 --- a/.github/unittest/linux_optdeps/scripts/install.sh +++ b/.github/unittest/linux_optdeps/scripts/install.sh @@ -23,7 +23,7 @@ printf "Installing PyTorch with %s\n" "${CU_VERSION}" pip3 install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/$CU_VERSION # install tensordict -pip install git+https://github.com/pytorch-labs/tensordict.git +pip install git+https://github.com/pytorch/tensordict.git # smoke test python -c "import functorch" diff --git a/.github/unittest/windows_optdepts/scripts/install.sh b/.github/unittest/windows_optdepts/scripts/install.sh index 55c536ac729..565535a2f1e 100644 --- a/.github/unittest/windows_optdepts/scripts/install.sh +++ b/.github/unittest/windows_optdepts/scripts/install.sh @@ -57,7 +57,7 @@ fi #python -m pip install pip --upgrade # install tensordict -pip3 install git+https://github.com/pytorch-labs/tensordict +pip3 install git+https://github.com/pytorch/tensordict # smoke test python -c """ diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 77d695fc76f..1a2384a1df1 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -31,7 +31,7 @@ jobs: - name: Setup Environment run: | python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu - python -m pip install git+https://github.com/pytorch-labs/tensordict + python -m pip install git+https://github.com/pytorch/tensordict python setup.py develop python -m pip install pytest pytest-benchmark python -m pip install dm_control @@ -94,7 +94,7 @@ jobs: - name: Setup Environment run: | python3 -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu118 - python3 -m pip install git+https://github.com/pytorch-labs/tensordict + python3 -m pip install git+https://github.com/pytorch/tensordict python3 setup.py develop python3 -m pip install pytest pytest-benchmark python3 -m pip install dm_control diff --git a/.github/workflows/benchmarks_pr.yml b/.github/workflows/benchmarks_pr.yml index 091581cb557..e44c683a6d6 100644 --- a/.github/workflows/benchmarks_pr.yml +++ b/.github/workflows/benchmarks_pr.yml @@ -30,7 +30,7 @@ jobs: - name: Setup Environment run: | python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu - python -m pip install git+https://github.com/pytorch-labs/tensordict + python -m pip install git+https://github.com/pytorch/tensordict python setup.py develop python -m pip install pytest pytest-benchmark python -m pip install dm_control @@ -105,7 +105,7 @@ jobs: - name: Setup Environment run: | python3 -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu118 - python3 -m pip install git+https://github.com/pytorch-labs/tensordict + python3 -m pip install git+https://github.com/pytorch/tensordict python3 setup.py develop python3 -m pip install pytest pytest-benchmark python3 -m pip install dm_control diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 16acc4aa5ac..bc0ae7be205 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -60,7 +60,7 @@ jobs: #pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu118 --quiet --root-user-action=ignore - name: Install tensordict run: | - pip3 install git+https://github.com/pytorch-labs/tensordict.git --quiet --root-user-action=ignore + pip3 install git+https://github.com/pytorch/tensordict.git --quiet --root-user-action=ignore - name: Install TorchRL run: | python3 setup.py develop @@ -88,7 +88,7 @@ jobs: apt-get update && apt-get install -y rsync - name: Pull TensorDict docs run: | - git clone --branch gh-pages https://github.com/pytorch-labs/tensordict.git docs/_local_build/tensordict + git clone --branch gh-pages https://github.com/pytorch/tensordict.git docs/_local_build/tensordict rm -rf docs/_local_build/tensordict/.git - name: Get output time run: echo "The time was ${{ steps.build.outputs.time }}" diff --git a/.github/workflows/nightly_build.yml b/.github/workflows/nightly_build.yml index 80cb4dccf7d..d371440cf82 100644 --- a/.github/workflows/nightly_build.yml +++ b/.github/workflows/nightly_build.yml @@ -126,7 +126,7 @@ jobs: python3 -mpip install numpy pytest --no-cache-dir - name: Install tensordict run: | - python3 -mpip install git+https://github.com/pytorch-labs/tensordict.git + python3 -mpip install git+https://github.com/pytorch/tensordict.git - name: Download built wheels uses: actions/download-artifact@v2 with: @@ -239,7 +239,7 @@ jobs: python3 -mpip install --upgrade pip - name: Install tensordict run: | - python3 -mpip install git+https://github.com/pytorch-labs/tensordict.git + python3 -mpip install git+https://github.com/pytorch/tensordict.git - name: Install test dependencies run: | export PATH="/opt/python/${{ matrix.python_version[1] }}/bin:$PATH" @@ -334,7 +334,7 @@ jobs: python3 -mpip install numpy pytest --no-cache-dir - name: Install tensordict run: | - python3 -mpip install git+https://github.com/pytorch-labs/tensordict.git + python3 -mpip install git+https://github.com/pytorch/tensordict.git - name: Download built wheels uses: actions/download-artifact@v2 with: diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 8d10f94e432..f70dcf6788f 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -140,7 +140,7 @@ jobs: python3 -mpip install --upgrade pip - name: Install tensordict run: | - python3 -mpip install git+https://github.com/pytorch-labs/tensordict.git + python3 -mpip install git+https://github.com/pytorch/tensordict.git - name: Install test dependencies run: | python3 -mpip install numpy pytest pytest-cov codecov unittest-xml-reporting pillow>=4.1.1 scipy av networkx expecttest pyyaml @@ -192,7 +192,7 @@ jobs: - name: Install tensordict shell: bash run: | - python3 -mpip install git+https://github.com/pytorch-labs/tensordict.git + python3 -mpip install git+https://github.com/pytorch/tensordict.git - name: Install test dependencies shell: bash run: | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 843a9712369..9f532397241 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,7 +15,7 @@ pip install tensordict-nightly ``` or the git version of the library: ``` -pip install git+https://github.com/pytorch-labs/tensordict +pip install git+https://github.com/pytorch/tensordict ``` Once cloned, make sure you install torchrl in develop mode by running diff --git a/README.md b/README.md index 517511e8ea1..e3176860f4f 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ We have some introductory videos for you to get to know the library better, chec RL algorithms are very heterogeneous, and it can be hard to recycle a codebase across settings (e.g. from online to offline, from state-based to pixel-based learning). -TorchRL solves this problem through [`TensorDict`](https://github.com/pytorch-labs/tensordict/), +TorchRL solves this problem through [`TensorDict`](https://github.com/pytorch/tensordict/), a convenient data structure(1) that can be used to streamline one's RL codebase. With this tool, one can write a *complete PPO training script in less than 100 @@ -219,7 +219,7 @@ to be easily recycled across settings. ``` -TensorDict comes with a dedicated [`tensordict.nn`](https://pytorch-labs.github.io/tensordict/reference/nn.html) +TensorDict comes with a dedicated [`tensordict.nn`](https://pytorch.github.io/tensordict/reference/nn.html) module that contains everything you might need to write your model with it. And it is `functorch` and `torch.compile` compatible! @@ -256,7 +256,7 @@ And it is `functorch` and `torch.compile` compatible! ``` - Check [TensorDict tutorials](https://pytorch-labs.github.io/tensordict/) to + Check [TensorDict tutorials](https://pytorch.github.io/tensordict/) to learn more! @@ -384,7 +384,7 @@ And it is `functorch` and `torch.compile` compatible! ``` -- various tools for distributed learning (e.g. [memory mapped tensors](https://github.com/pytorch-labs/tensordict/blob/main/tensordict/memmap.py))(2); +- various tools for distributed learning (e.g. [memory mapped tensors](https://github.com/pytorch/tensordict/blob/main/tensordict/memmap.py))(2); - various [architectures](torchrl/modules/models/) and models (e.g. [actor-critic](torchrl/modules/tensordict_module/actors.py))(1):
Code @@ -470,7 +470,7 @@ And it is `functorch` and `torch.compile` compatible! ### Advantage computation ```python from torchrl.objectives.value.functional import vec_td_lambda_return_estimate - advantage = vec_td_lambda_return_estimate(gamma, lmbda, next_state_value, reward, done) + advantage = vec_td_lambda_return_estimate(gamma, lmbda, next_state_value, reward, done, terminated) ```
diff --git a/docs/source/conf.py b/docs/source/conf.py index 497a0df4fdb..00acf6b67ed 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -73,7 +73,7 @@ intersphinx_mapping = { "torch": ("https://pytorch.org/docs/stable/", None), - "tensordict": ("https://pytorch-labs.github.io/tensordict/", None), + "tensordict": ("https://pytorch.github.io/tensordict/", None), # "torchrl": ("https://pytorch.org/rl/", None), "torchaudio": ("https://pytorch.org/audio/stable/", None), "torchtext": ("https://pytorch.org/text/stable/", None), From 4db9cd1269b0aaad56f43461bdd3c41ba36089c0 Mon Sep 17 00:00:00 2001 From: vmoens Date: Thu, 5 Oct 2023 16:04:52 +0100 Subject: [PATCH 4/8] amend --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e3176860f4f..5fc3ce6c8ba 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![pytorch](https://circleci.com/gh/pytorch/rl.svg?style=shield)](https://circleci.com/gh/pytorch/rl) +![GHA](https://github.com/pytorch/rl/.github/workflows/test-linux-gpu.yml/badge.svg) [![Documentation](https://img.shields.io/badge/Documentation-blue.svg)](https://pytorch.org/rl/) [![Benchmarks](https://img.shields.io/badge/Benchmarks-blue.svg)](https://pytorch.github.io/rl/dev/bench/) [![codecov](https://codecov.io/gh/pytorch/rl/branch/main/graph/badge.svg?token=HcpK1ILV6r)](https://codecov.io/gh/pytorch/rl) From 979fefba58f466a7974ee62d44e2a13bbbc8728e Mon Sep 17 00:00:00 2001 From: vmoens Date: Thu, 5 Oct 2023 16:08:13 +0100 Subject: [PATCH 5/8] amend --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5fc3ce6c8ba..9220fdbcd10 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![GHA](https://github.com/pytorch/rl/.github/workflows/test-linux-gpu.yml/badge.svg) +[![Unit-tests](https://github.com/pytorch/rl/actions/workflows/test-linux-gpu.yml/badge.svg)](https://github.com/pytorch/rl/actions/workflows/test-linux-gpu.yml) [![Documentation](https://img.shields.io/badge/Documentation-blue.svg)](https://pytorch.org/rl/) [![Benchmarks](https://img.shields.io/badge/Benchmarks-blue.svg)](https://pytorch.github.io/rl/dev/bench/) [![codecov](https://codecov.io/gh/pytorch/rl/branch/main/graph/badge.svg?token=HcpK1ILV6r)](https://codecov.io/gh/pytorch/rl) From bd9537508549916bded19e205ef19776d3c77622 Mon Sep 17 00:00:00 2001 From: vmoens Date: Thu, 5 Oct 2023 16:51:31 +0100 Subject: [PATCH 6/8] amend --- .github/unittest/linux/scripts/run_all.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/unittest/linux/scripts/run_all.sh b/.github/unittest/linux/scripts/run_all.sh index 67b7be9ef40..f682abe47f5 100755 --- a/.github/unittest/linux/scripts/run_all.sh +++ b/.github/unittest/linux/scripts/run_all.sh @@ -124,9 +124,9 @@ 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 --extra-index-url https://download.pytorch.org/whl/nightly/cpu + pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu else - pip3 install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/$CU_VERSION + pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/$CU_VERSION fi elif [[ "$TORCH_VERSION" == "stable" ]]; then if [ "${CU_VERSION:-}" == cpu ] ; then From 340249e4ba8541da7aa8064c4ef26527330b120e Mon Sep 17 00:00:00 2001 From: vmoens Date: Thu, 5 Oct 2023 16:52:40 +0100 Subject: [PATCH 7/8] amend --- .github/unittest/linux_distributed/scripts/install.sh | 4 ++-- .github/unittest/linux_examples/scripts/run_all.sh | 2 +- .github/unittest/linux_libs/scripts_brax/install.sh | 4 ++-- .github/unittest/linux_libs/scripts_d4rl/install.sh | 4 ++-- .github/unittest/linux_libs/scripts_envpool/install.sh | 4 ++-- .github/unittest/linux_libs/scripts_habitat/install.sh | 2 +- .github/unittest/linux_libs/scripts_jumanji/install.sh | 4 ++-- .github/unittest/linux_libs/scripts_pettingzoo/install.sh | 4 ++-- .github/unittest/linux_libs/scripts_rlhf/install.sh | 4 ++-- .../linux_libs/scripts_robohive/install_and_run_test.sh | 4 ++-- .github/unittest/linux_libs/scripts_sklearn/install.sh | 4 ++-- .github/unittest/linux_libs/scripts_smacv2/install.sh | 4 ++-- .github/unittest/linux_libs/scripts_vmas/install.sh | 4 ++-- .github/unittest/linux_optdeps/scripts/install.sh | 2 +- 14 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/unittest/linux_distributed/scripts/install.sh b/.github/unittest/linux_distributed/scripts/install.sh index e8ee50df939..95eda22aecb 100755 --- a/.github/unittest/linux_distributed/scripts/install.sh +++ b/.github/unittest/linux_distributed/scripts/install.sh @@ -28,9 +28,9 @@ 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 --extra-index-url https://download.pytorch.org/whl/nightly/cpu + pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu else - pip3 install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/$CU_VERSION + pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/$CU_VERSION fi # smoke test diff --git a/.github/unittest/linux_examples/scripts/run_all.sh b/.github/unittest/linux_examples/scripts/run_all.sh index 34cde2bfc3a..6bf73ff1b95 100755 --- a/.github/unittest/linux_examples/scripts/run_all.sh +++ b/.github/unittest/linux_examples/scripts/run_all.sh @@ -146,7 +146,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 --extra-index-url https://download.pytorch.org/whl/nightly/$CU_VERSION +pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/$CU_VERSION # smoke test python -c "import functorch" diff --git a/.github/unittest/linux_libs/scripts_brax/install.sh b/.github/unittest/linux_libs/scripts_brax/install.sh index a06302b7f12..b3a42967935 100755 --- a/.github/unittest/linux_libs/scripts_brax/install.sh +++ b/.github/unittest/linux_libs/scripts_brax/install.sh @@ -30,9 +30,9 @@ 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 --extra-index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall --progress-bar off + pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall --progress-bar off else - pip3 install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall --progress-bar off + pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall --progress-bar off fi # install tensordict diff --git a/.github/unittest/linux_libs/scripts_d4rl/install.sh b/.github/unittest/linux_libs/scripts_d4rl/install.sh index b9d333e4fbd..feb922d14b8 100755 --- a/.github/unittest/linux_libs/scripts_d4rl/install.sh +++ b/.github/unittest/linux_libs/scripts_d4rl/install.sh @@ -33,9 +33,9 @@ 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 --extra-index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall + pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall else - pip3 install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall + pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall fi # install tensordict diff --git a/.github/unittest/linux_libs/scripts_envpool/install.sh b/.github/unittest/linux_libs/scripts_envpool/install.sh index fbc56587584..c62a2de25fb 100755 --- a/.github/unittest/linux_libs/scripts_envpool/install.sh +++ b/.github/unittest/linux_libs/scripts_envpool/install.sh @@ -28,9 +28,9 @@ 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 --extra-index-url https://download.pytorch.org/whl/nightly/cpu + pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu else - pip3 install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cu118 + pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu118 fi # smoke test diff --git a/.github/unittest/linux_libs/scripts_habitat/install.sh b/.github/unittest/linux_libs/scripts_habitat/install.sh index ceef527d8e0..316cf9e3225 100755 --- a/.github/unittest/linux_libs/scripts_habitat/install.sh +++ b/.github/unittest/linux_libs/scripts_habitat/install.sh @@ -20,7 +20,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 --extra-index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall +pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall # install tensordict pip3 install git+https://github.com/pytorch/tensordict.git diff --git a/.github/unittest/linux_libs/scripts_jumanji/install.sh b/.github/unittest/linux_libs/scripts_jumanji/install.sh index 954b8869abf..ee6c747315c 100755 --- a/.github/unittest/linux_libs/scripts_jumanji/install.sh +++ b/.github/unittest/linux_libs/scripts_jumanji/install.sh @@ -30,9 +30,9 @@ 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 --extra-index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall + pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall else - pip3 install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall + pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall fi # install tensordict diff --git a/.github/unittest/linux_libs/scripts_pettingzoo/install.sh b/.github/unittest/linux_libs/scripts_pettingzoo/install.sh index e363968f0e8..0c7bc8f402b 100755 --- a/.github/unittest/linux_libs/scripts_pettingzoo/install.sh +++ b/.github/unittest/linux_libs/scripts_pettingzoo/install.sh @@ -30,9 +30,9 @@ 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 --extra-index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall + pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall else - pip3 install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall + pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall fi # install tensordict diff --git a/.github/unittest/linux_libs/scripts_rlhf/install.sh b/.github/unittest/linux_libs/scripts_rlhf/install.sh index 6464c6d5915..25a73fd6dff 100755 --- a/.github/unittest/linux_libs/scripts_rlhf/install.sh +++ b/.github/unittest/linux_libs/scripts_rlhf/install.sh @@ -33,9 +33,9 @@ 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 --extra-index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall + pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall else - pip3 install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall + pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall fi # install tensordict diff --git a/.github/unittest/linux_libs/scripts_robohive/install_and_run_test.sh b/.github/unittest/linux_libs/scripts_robohive/install_and_run_test.sh index 4014690944f..68fe922ec5d 100755 --- a/.github/unittest/linux_libs/scripts_robohive/install_and_run_test.sh +++ b/.github/unittest/linux_libs/scripts_robohive/install_and_run_test.sh @@ -41,9 +41,9 @@ 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 --extra-index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall + pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall else - pip3 install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall + pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall fi # install tensordict diff --git a/.github/unittest/linux_libs/scripts_sklearn/install.sh b/.github/unittest/linux_libs/scripts_sklearn/install.sh index b9d333e4fbd..feb922d14b8 100755 --- a/.github/unittest/linux_libs/scripts_sklearn/install.sh +++ b/.github/unittest/linux_libs/scripts_sklearn/install.sh @@ -33,9 +33,9 @@ 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 --extra-index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall + pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall else - pip3 install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall + pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall fi # install tensordict diff --git a/.github/unittest/linux_libs/scripts_smacv2/install.sh b/.github/unittest/linux_libs/scripts_smacv2/install.sh index e363968f0e8..0c7bc8f402b 100755 --- a/.github/unittest/linux_libs/scripts_smacv2/install.sh +++ b/.github/unittest/linux_libs/scripts_smacv2/install.sh @@ -30,9 +30,9 @@ 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 --extra-index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall + pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall else - pip3 install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall + pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall fi # install tensordict diff --git a/.github/unittest/linux_libs/scripts_vmas/install.sh b/.github/unittest/linux_libs/scripts_vmas/install.sh index e363968f0e8..0c7bc8f402b 100755 --- a/.github/unittest/linux_libs/scripts_vmas/install.sh +++ b/.github/unittest/linux_libs/scripts_vmas/install.sh @@ -30,9 +30,9 @@ 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 --extra-index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall + pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall else - pip3 install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall + pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall fi # install tensordict diff --git a/.github/unittest/linux_optdeps/scripts/install.sh b/.github/unittest/linux_optdeps/scripts/install.sh index 74c0cf27d32..e7d48b4cb9b 100755 --- a/.github/unittest/linux_optdeps/scripts/install.sh +++ b/.github/unittest/linux_optdeps/scripts/install.sh @@ -20,7 +20,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 --extra-index-url https://download.pytorch.org/whl/nightly/$CU_VERSION +pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/$CU_VERSION # install tensordict pip install git+https://github.com/pytorch/tensordict.git From d93fd3bb137f6ced60c37dc513660db274d10f4b Mon Sep 17 00:00:00 2001 From: vmoens Date: Thu, 5 Oct 2023 17:35:27 +0100 Subject: [PATCH 8/8] amend --- .github/workflows/nightly_build.yml | 12 ++++++------ .github/workflows/wheels.yml | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/nightly_build.yml b/.github/workflows/nightly_build.yml index d371440cf82..923a3f3dfc1 100644 --- a/.github/workflows/nightly_build.yml +++ b/.github/workflows/nightly_build.yml @@ -45,7 +45,7 @@ jobs: - name: Install PyTorch nightly run: | export PATH="/opt/python/${{ matrix.python_version[1] }}/bin:$PATH" - python3 -mpip install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/${{ matrix.cuda_support[1] }} + python3 -mpip install --pre torch --index-url https://download.pytorch.org/whl/nightly/${{ matrix.cuda_support[1] }} - name: Build TorchRL Nightly run: | rm -r dist || true @@ -84,7 +84,7 @@ jobs: uses: actions/checkout@v2 - name: Install PyTorch nightly run: | - python3 -mpip install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cpu + python3 -mpip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu - name: Build TorchRL Nightly run: | rm -r dist || true @@ -117,7 +117,7 @@ jobs: uses: actions/checkout@v2 - name: Install PyTorch Nightly run: | - python3 -mpip install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cpu + python3 -mpip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu - name: Upgrade pip run: | python3 -mpip install --upgrade pip @@ -232,7 +232,7 @@ jobs: - name: Install PyTorch Nightly run: | export PATH="/opt/python/${{ matrix.python_version[1] }}/bin:$PATH" - python3 -mpip install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/${{ matrix.cuda_support[1] }} + python3 -mpip install --pre torch --index-url https://download.pytorch.org/whl/nightly/${{ matrix.cuda_support[1] }} - name: Upgrade pip run: | export PATH="/opt/python/${{ matrix.python_version[1] }}/bin:$PATH" @@ -290,7 +290,7 @@ jobs: - name: Install PyTorch nightly shell: bash run: | - python3 -mpip install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cpu + python3 -mpip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu - name: Build TorchRL nightly shell: bash run: | @@ -323,7 +323,7 @@ jobs: - name: Install PyTorch Nightly shell: bash run: | - python3 -mpip install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cpu + python3 -mpip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu - name: Upgrade pip shell: bash run: | diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index f70dcf6788f..302c0350c6f 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: python_version: [["3.8", "cp38-cp38"], ["3.9", "cp39-cp39"], ["3.10", "cp310-cp310"], ["3.11", "cp311-cp311"]] - cuda_support: [["", "--extra-index-url https://download.pytorch.org/whl/cpu", "\"['cpu', '11.3', '11.6']\"", "cpu"]] + cuda_support: [["", "--index-url https://download.pytorch.org/whl/cpu", "\"['cpu', '11.3', '11.6']\"", "cpu"]] container: pytorch/manylinux-${{ matrix.cuda_support[3] }} steps: - name: Checkout torchrl @@ -67,7 +67,7 @@ jobs: uses: actions/checkout@v2 - name: Install PyTorch RC run: | - python3 -mpip install torch --extra-index-url https://download.pytorch.org/whl/cpu + python3 -mpip install torch --index-url https://download.pytorch.org/whl/cpu - name: Build wheel run: | export CC=clang CXX=clang++ @@ -99,7 +99,7 @@ jobs: - name: Install PyTorch RC shell: bash run: | - python3 -mpip install torch --extra-index-url https://download.pytorch.org/whl/cpu + python3 -mpip install torch --index-url https://download.pytorch.org/whl/cpu - name: Build wheel shell: bash run: | @@ -134,7 +134,7 @@ jobs: uses: actions/checkout@v2 - name: Install PyTorch RC run: | - python3 -mpip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu + python3 -mpip install torch torchvision --index-url https://download.pytorch.org/whl/cpu - name: Upgrade pip run: | python3 -mpip install --upgrade pip @@ -184,7 +184,7 @@ jobs: - name: Install PyTorch RC shell: bash run: | - python3 -mpip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu + python3 -mpip install torch torchvision --index-url https://download.pytorch.org/whl/cpu - name: Upgrade pip shell: bash run: |