Skip to content

Commit

Permalink
[CI] Fix CI (python and cuda versions) (#1621)
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens authored Oct 12, 2023
1 parent 70c650e commit 38dfc21
Show file tree
Hide file tree
Showing 32 changed files with 254 additions and 96 deletions.
4 changes: 2 additions & 2 deletions .github/unittest/linux_libs/scripts_brax/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if [ "${CU_VERSION:-}" == cpu ] ; then
# 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
else
pip3 install --pre torch --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/cu121 --force-reinstall --progress-bar off
fi

# install tensordict
Expand All @@ -42,7 +42,7 @@ pip install git+https://github.com/pytorch/tensordict.git --progress-bar off
python -c "import functorch;import tensordict"

printf "* Installing torchrl\n"
pip3 install -e .
python setup.py develop

# smoke test
python -c "import torchrl"
4 changes: 2 additions & 2 deletions .github/unittest/linux_libs/scripts_d4rl/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if [ "${CU_VERSION:-}" == cpu ] ; then
# conda install -y pytorch cpuonly -c pytorch-nightly
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall
else
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 --force-reinstall
fi

# install tensordict
Expand All @@ -45,7 +45,7 @@ pip install git+https://github.com/pytorch/tensordict.git
python -c "import functorch;import tensordict"

printf "* Installing torchrl\n"
pip3 install -e .
python setup.py develop

# smoke test
python -c "import torchrl"
4 changes: 2 additions & 2 deletions .github/unittest/linux_libs/scripts_habitat/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 --index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 --force-reinstall

# install tensordict
pip3 install git+https://github.com/pytorch/tensordict.git
Expand All @@ -29,7 +29,7 @@ pip3 install git+https://github.com/pytorch/tensordict.git
python3 -c "import functorch;import tensordict"

printf "* Installing torchrl\n"
pip3 install -e .
python setup.py develop

# smoke test
python3 -c "import torchrl"
4 changes: 2 additions & 2 deletions .github/unittest/linux_libs/scripts_jumanji/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if [ "${CU_VERSION:-}" == cpu ] ; then
# conda install -y pytorch cpuonly -c pytorch-nightly
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall
else
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 --force-reinstall
fi

# install tensordict
Expand All @@ -42,7 +42,7 @@ pip install git+https://github.com/pytorch/tensordict.git
python -c "import functorch;import tensordict"

printf "* Installing torchrl\n"
pip3 install -e .
python setup.py develop

# smoke test
python -c "import torchrl"
2 changes: 1 addition & 1 deletion .github/unittest/linux_libs/scripts_pettingzoo/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if [ "${CU_VERSION:-}" == cpu ] ; then
# conda install -y pytorch cpuonly -c pytorch-nightly
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall
else
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 --force-reinstall
fi

# install tensordict
Expand Down
4 changes: 2 additions & 2 deletions .github/unittest/linux_libs/scripts_rlhf/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if [ "${CU_VERSION:-}" == cpu ] ; then
# conda install -y pytorch cpuonly -c pytorch-nightly
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall
else
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 --force-reinstall
fi

# install tensordict
Expand All @@ -45,7 +45,7 @@ pip install git+https://github.com/pytorch/tensordict.git
python -c "import tensordict"

printf "* Installing torchrl\n"
pip3 install -e .
python setup.py develop

# smoke test
python -c "import torchrl"
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if [ "${CU_VERSION:-}" == cpu ] ; then
# conda install -y pytorch cpuonly -c pytorch-nightly
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall
else
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 --force-reinstall
fi

# install tensordict
Expand Down
4 changes: 2 additions & 2 deletions .github/unittest/linux_libs/scripts_sklearn/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if [ "${CU_VERSION:-}" == cpu ] ; then
# conda install -y pytorch cpuonly -c pytorch-nightly
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall
else
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 --force-reinstall
fi

# install tensordict
Expand All @@ -45,7 +45,7 @@ pip install git+https://github.com/pytorch/tensordict.git
python -c "import functorch;import tensordict"

printf "* Installing torchrl\n"
pip3 install -e .
python setup.py develop

# smoke test
python -c "import torchrl"
2 changes: 1 addition & 1 deletion .github/unittest/linux_libs/scripts_smacv2/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if [ "${CU_VERSION:-}" == cpu ] ; then
# conda install -y pytorch cpuonly -c pytorch-nightly
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall
else
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 --force-reinstall
fi

# install tensordict
Expand Down
2 changes: 1 addition & 1 deletion .github/unittest/linux_libs/scripts_vmas/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if [ "${CU_VERSION:-}" == cpu ] ; then
# conda install -y pytorch cpuonly -c pytorch-nightly
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall
else
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu116 --force-reinstall
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 --force-reinstall
fi

# install tensordict
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/test-linux-brax.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ concurrency:

jobs:
unittests:
strategy:
matrix:
python_version: ["3.9"]
cuda_arch_version: ["12.1"]
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with:
repository: pytorch/rl
Expand All @@ -27,8 +31,8 @@ jobs:
script: |
set -euo pipefail
export PYTHON_VERSION="3.8"
export CU_VERSION="11.7"
export PYTHON_VERSION="3.9"
export CU_VERSION="12.1"
export TAR_OPTIONS="--no-same-owner"
export UPLOAD_CHANNEL="nightly"
export TF_CPP_MIN_LOG_LEVEL=0
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test-linux-d4rl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ concurrency:

jobs:
unittests:
strategy:
matrix:
python_version: ["3.9"]
cuda_arch_version: ["12.1"]
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with:
repository: pytorch/rl
Expand All @@ -25,7 +29,7 @@ jobs:
timeout: 120
script: |
set -euo pipefail
export PYTHON_VERSION="3.8"
export PYTHON_VERSION="3.9"
export CU_VERSION="cu117"
export TAR_OPTIONS="--no-same-owner"
export UPLOAD_CHANNEL="nightly"
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/test-linux-envpool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:

jobs:
unittests:
strategy:
matrix:
python_version: ["3.9"]
cuda_arch_version: ["12.1"]
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with:
repository: pytorch/rl
Expand All @@ -22,8 +26,8 @@ jobs:
timeout: 120
script: |
set -euo pipefail
export PYTHON_VERSION="3.8"
export CU_VERSION="11.7"
export PYTHON_VERSION="3.9"
export CU_VERSION="12.1"
export TAR_OPTIONS="--no-same-owner"
export UPLOAD_CHANNEL="nightly"
export TF_CPP_MIN_LOG_LEVEL=0
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/test-linux-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
tests:
strategy:
matrix:
python_version: ["3.9"] # "3.8", "3.9", "3.10", "3.11"
cuda_arch_version: ["11.6"] # "11.6", "11.7"
python_version: ["3.9"]
cuda_arch_version: ["12.1"]
fail-fast: false
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with:
Expand All @@ -36,11 +36,8 @@ jobs:
script: |
# Set env vars from matrix
export PYTHON_VERSION=${{ matrix.python_version }}
# Commenting these out for now because the GPU test are not working inside docker
export CUDA_ARCH_VERSION=${{ matrix.cuda_arch_version }}
export CU_VERSION="cu${CUDA_ARCH_VERSION:0:2}${CUDA_ARCH_VERSION:3:1}"
# Remove the following line when the GPU tests are working inside docker, and uncomment the above lines
#export CU_VERSION="cpu"
echo "PYTHON_VERSION: $PYTHON_VERSION"
echo "CU_VERSION: $CU_VERSION"
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test-linux-gym.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ concurrency:

jobs:
unittests:
strategy:
matrix:
python_version: ["3.9"]
cuda_arch_version: ["12.1"]
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with:
repository: pytorch/rl
Expand All @@ -27,7 +31,7 @@ jobs:
timeout: 120
script: |
set -euxo pipefail
export PYTHON_VERSION="3.8"
export PYTHON_VERSION="3.9"
# export CU_VERSION="${{ inputs.gpu-arch-version }}"
export CU_VERSION="11.4"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/work/mujoco-py/mujoco_py/binaries/linux/mujoco210/bin"
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test-linux-jumanji.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ concurrency:

jobs:
unittests:
strategy:
matrix:
python_version: ["3.9"]
cuda_arch_version: ["12.1"]
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with:
repository: pytorch/rl
Expand All @@ -27,7 +31,7 @@ jobs:
script: |
set -euo pipefail
export PYTHON_VERSION="3.9"
export CU_VERSION="11.7"
export CU_VERSION="12.1"
export TAR_OPTIONS="--no-same-owner"
export UPLOAD_CHANNEL="nightly"
export TF_CPP_MIN_LOG_LEVEL=0
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-linux-olddeps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:

jobs:
unittests:
strategy:
matrix:
python_version: ["3.8"]
cuda_arch_version: ["11.6"]
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with:
repository: pytorch/rl
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-linux-pettingzoo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
script: |
set -euo pipefail
export PYTHON_VERSION="3.9"
export CU_VERSION="11.7"
export CU_VERSION="12.1"
export TAR_OPTIONS="--no-same-owner"
export UPLOAD_CHANNEL="nightly"
export TF_CPP_MIN_LOG_LEVEL=0
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test-linux-rlhf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ concurrency:

jobs:
unittests:
strategy:
matrix:
python_version: ["3.9"]
cuda_arch_version: ["12.1"]
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with:
repository: pytorch/rl
Expand All @@ -27,7 +31,7 @@ jobs:
timeout: 120
script: |
set -euo pipefail
export PYTHON_VERSION="3.8"
export PYTHON_VERSION="3.9"
export CU_VERSION="cu117"
export TAR_OPTIONS="--no-same-owner"
export UPLOAD_CHANNEL="nightly"
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test-linux-robohive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:

jobs:
unittests:
strategy:
matrix:
python_version: ["3.9"]
cuda_arch_version: ["12.1"]
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with:
repository: pytorch/rl
Expand All @@ -19,7 +23,7 @@ jobs:
timeout: 120
script: |
set -euo pipefail
export PYTHON_VERSION="3.8"
export PYTHON_VERSION="3.9"
export CU_VERSION="cu117"
export TAR_OPTIONS="--no-same-owner"
export UPLOAD_CHANNEL="nightly"
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test-linux-sklearn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ concurrency:

jobs:
unittests:
strategy:
matrix:
python_version: ["3.9"]
cuda_arch_version: ["12.1"]
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with:
repository: pytorch/rl
Expand All @@ -27,7 +31,7 @@ jobs:
timeout: 120
script: |
set -euo pipefail
export PYTHON_VERSION="3.8"
export PYTHON_VERSION="3.9"
export CU_VERSION="cu117"
export TAR_OPTIONS="--no-same-owner"
export UPLOAD_CHANNEL="nightly"
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test-linux-smacv2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ concurrency:

jobs:
unittests:
strategy:
matrix:
python_version: ["3.9"]
cuda_arch_version: ["12.1"]
if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'Environments') }}
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with:
Expand All @@ -28,7 +32,7 @@ jobs:
script: |
set -euo pipefail
export PYTHON_VERSION="3.9"
export CU_VERSION="11.7"
export CU_VERSION="12.1"
export TAR_OPTIONS="--no-same-owner"
export UPLOAD_CHANNEL="nightly"
export TF_CPP_MIN_LOG_LEVEL=0
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test-linux-vmas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ concurrency:

jobs:
unittests:
strategy:
matrix:
python_version: ["3.9"]
cuda_arch_version: ["12.1"]
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with:
repository: pytorch/rl
Expand All @@ -27,7 +31,7 @@ jobs:
script: |
set -euo pipefail
export PYTHON_VERSION="3.9"
export CU_VERSION="11.7"
export CU_VERSION="12.1"
export TAR_OPTIONS="--no-same-owner"
export UPLOAD_CHANNEL="nightly"
export TF_CPP_MIN_LOG_LEVEL=0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-macos-cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
tests:
strategy:
matrix:
python_version: ["3.8", "3.9", "3.10", "3.11"]
python_version: ["3.8", "3.11"]
fail-fast: false
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
with:
Expand Down
Loading

0 comments on commit 38dfc21

Please sign in to comment.