Skip to content

Commit 57bdc6a

Browse files
author
Vincent Moens
committed
[CI] Install stable torch/tv in docs when on release branch
ghstack-source-id: 7c39c04 Pull Request resolved: #2761
1 parent 03f56ff commit 57bdc6a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/docs.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,13 @@ jobs:
7676
git version
7777
7878
# 5. Install PyTorch
79-
python3 -m pip install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U --quiet --root-user-action=ignore
80-
81-
# 6. Install tensordict
82-
python3 -m pip install git+https://github.com/pytorch/tensordict.git --quiet --root-user-action=ignore
79+
if [[ ${{ github.event_name }} == push && (${{ github.ref_type }} == tag || (${{ github.ref_type }} == branch && ${{ github.ref_name }} == release/*)) ]]; then
80+
python3 -m pip install torch torchvision
81+
python3 -m pip install tensordict
82+
else
83+
python3 -m pip install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U --quiet --root-user-action=ignore
84+
python3 -m pip install git+https://github.com/pytorch/tensordict.git --quiet --root-user-action=ignore
85+
fi
8386
8487
# 7. Install TorchRL
8588
python3 setup.py develop

0 commit comments

Comments
 (0)