Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions .github/unittest/linux/scripts/run_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -222,16 +222,16 @@ export pybind11_DIR

# install tensordict
if [[ "$RELEASE" == 0 ]]; then
uv_pip_install --no-build-isolation git+https://github.com/pytorch/tensordict.git
uv_pip_install --no-build-isolation --no-deps git+https://github.com/pytorch/tensordict.git
else
uv_pip_install tensordict
uv_pip_install --no-deps tensordict
fi

printf "* Installing torchrl\n"
if [[ "$RELEASE" == 0 ]]; then
uv_pip_install -e . --no-build-isolation --no-deps
else
uv_pip_install -e . --no-build-isolation
uv_pip_install -e . --no-build-isolation --no-deps
fi

if [ "${CU_VERSION:-}" != cpu ] ; then
Expand Down
6 changes: 3 additions & 3 deletions .github/unittest/linux_libs/scripts_minari/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ fi

# install tensordict
if [[ "$RELEASE" == 0 ]]; then
uv pip install git+https://github.com/pytorch/tensordict.git
uv pip install --no-deps git+https://github.com/pytorch/tensordict.git
else
uv pip install tensordict
uv pip install --no-deps tensordict
fi

# smoke test
python -c "import functorch;import tensordict"

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

# smoke test
python -c "import torchrl"
6 changes: 3 additions & 3 deletions .github/unittest/linux_sota/scripts/run_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@ python -c "import functorch"

# install tensordict
if [[ "$RELEASE" == 0 ]]; then
uv pip install git+https://github.com/pytorch/tensordict.git
uv pip install --no-deps git+https://github.com/pytorch/tensordict.git
else
uv pip install tensordict
uv pip install --no-deps tensordict
fi

printf "* Installing torchrl\n"
uv pip install -e . --no-build-isolation
uv pip install -e . --no-build-isolation --no-deps

# ==================================================================================== #
# ================================ Run tests ========================================= #
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1089,6 +1089,14 @@ pip install -e tensordict
pip install -e rl
```

If you use `uv` (instead of `pip`) and you have already installed a specific PyTorch build (e.g. nightly),
make sure `uv` doesn't re-resolve dependencies (which can downgrade PyTorch). Use `--no-deps` for the local installs:

```bash
uv pip install --no-deps -e tensordict
uv pip install --no-deps -e rl
```

Note that tensordict local build requires `cmake` to be installed via [homebrew](https://brew.sh/) (MacOS) or another package manager
such as `apt`, `apt-get`, `conda` or `yum` but NOT `pip`, as well as `pip install "pybind11[global]"`.

Expand Down
13 changes: 13 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,19 @@ or via a ``git clone`` if you're willing to contribute to the library:
$ cd ../rl
$ python setup.py develop

If you use ``uv`` and you installed a specific PyTorch build beforehand (e.g. a nightly wheel),
use ``--no-deps`` for the editable installs to prevent dependency re-resolution (and potential PyTorch downgrades):

.. code-block:: bash

$ cd path/to/root
$ git clone https://github.com/pytorch/tensordict
$ git clone https://github.com/pytorch/rl
$ cd tensordict
$ uv pip install --no-deps -e .
$ cd ../rl
$ uv pip install --no-deps -e .

Getting started
===============

Expand Down
Loading