From 57bdc6aec66633136178ef9aa87a7b9ff30aad87 Mon Sep 17 00:00:00 2001 From: Vincent Moens Date: Wed, 5 Feb 2025 18:08:02 +0000 Subject: [PATCH] [CI] Install stable torch/tv in docs when on release branch ghstack-source-id: 7c39c049c7cff0ee112be2d07597f2e291d2fafd Pull Request resolved: https://github.com/pytorch/rl/pull/2761 --- .github/workflows/docs.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6b963ce9ca1..5f99fb12ba6 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -76,10 +76,13 @@ jobs: git version # 5. Install PyTorch - python3 -m pip install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U --quiet --root-user-action=ignore - - # 6. Install tensordict - python3 -m pip install git+https://github.com/pytorch/tensordict.git --quiet --root-user-action=ignore + if [[ ${{ github.event_name }} == push && (${{ github.ref_type }} == tag || (${{ github.ref_type }} == branch && ${{ github.ref_name }} == release/*)) ]]; then + python3 -m pip install torch torchvision + python3 -m pip install tensordict + else + python3 -m pip install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U --quiet --root-user-action=ignore + python3 -m pip install git+https://github.com/pytorch/tensordict.git --quiet --root-user-action=ignore + fi # 7. Install TorchRL python3 setup.py develop