From bd47ee1663a2e3338fdbd1fb3242a075824e0e69 Mon Sep 17 00:00:00 2001 From: Vincent Moens Date: Thu, 19 Dec 2024 10:30:18 +0000 Subject: [PATCH] Update (base update) [ghstack-poisoned] --- .github/workflows/nightly_build.yml | 40 +++++++++++++++-------------- test/smoke_test.py | 7 +---- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/.github/workflows/nightly_build.yml b/.github/workflows/nightly_build.yml index 8ce894077..dde4b4b61 100644 --- a/.github/workflows/nightly_build.yml +++ b/.github/workflows/nightly_build.yml @@ -27,10 +27,6 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && format('ci-master-{0}', github.sha) || format('ci-{0}', github.ref) }} cancel-in-progress: true -env: - ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16 - ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true # https://github.com/actions/checkout/issues/1809 jobs: build-wheel-linux: @@ -46,10 +42,13 @@ jobs: ["3.12", "cp312-cp312"], ] cuda_support: [["", "cpu", "cpu"]] - container: pytorch/manylinux-${{ matrix.cuda_support[2] }} steps: - name: Checkout tensordict - uses: actions/checkout@v3 + uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python_version[0] }} - name: Install PyTorch nightly run: | export PATH="/opt/python/${{ matrix.python_version[1] }}/bin:$PATH" @@ -71,7 +70,7 @@ jobs: python3 -mpip install auditwheel auditwheel show dist/* - name: Upload wheel for the test-wheel job - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: tensordict-linux-${{ matrix.python_version[0] }}_${{ matrix.cuda_support[2] }}.whl path: dist/*.whl @@ -90,12 +89,15 @@ jobs: ["3.12", "cp312-cp312"], ] cuda_support: [["", "cpu", "cpu"]] - container: pytorch/manylinux-${{ matrix.cuda_support[2] }} steps: - name: Checkout tensordict - uses: actions/checkout@v3 + uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python_version[0] }} - name: Download built wheels - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: tensordict-linux-${{ matrix.python_version[0] }}_${{ matrix.cuda_support[2] }}.whl path: /tmp/wheels @@ -128,14 +130,14 @@ jobs: cuda_support: [["", "cpu", "cpu"]] steps: - name: Setup Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python_version[0] }} architecture: x64 env: AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache" - name: Checkout tensordict - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install PyTorch Nightly run: | export PATH="/opt/python/${{ matrix.python_version[1] }}/bin:$PATH" @@ -149,7 +151,7 @@ jobs: export PATH="/opt/python/${{ matrix.python_version[1] }}/bin:$PATH" python3 -mpip install numpy pytest pillow>=4.1.1 scipy networkx expecttest pyyaml - name: Download built wheels - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: tensordict-linux-${{ matrix.python_version[0] }}_${{ matrix.cuda_support[2] }}.whl path: /tmp/wheels @@ -195,7 +197,7 @@ jobs: with: python-version: ${{ matrix.python_version[1] }} - name: Checkout tensordict - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install PyTorch nightly shell: bash run: | @@ -209,7 +211,7 @@ jobs: --package_name tensordict-nightly \ --python-tag=${{ matrix.python-tag }} - name: Upload wheel for the test-wheel job - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: tensordict-win-${{ matrix.python_version[0] }}.whl path: dist/*.whl @@ -233,7 +235,7 @@ jobs: with: python-version: ${{ matrix.python_version[1] }} - name: Checkout tensordict - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install PyTorch Nightly shell: bash run: | @@ -247,7 +249,7 @@ jobs: run: | python3 -mpip install numpy pytest --no-cache-dir - name: Download built wheels - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: tensordict-win-${{ matrix.python_version[0] }}.whl path: wheels @@ -288,9 +290,9 @@ jobs: ] steps: - name: Checkout tensordict - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download built wheels - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: tensordict-win-${{ matrix.python_version[0] }}.whl path: wheels diff --git a/test/smoke_test.py b/test/smoke_test.py index cc45dd52c..4f0e89ee4 100644 --- a/test/smoke_test.py +++ b/test/smoke_test.py @@ -2,10 +2,6 @@ # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -import argparse -import sys - -import pytest def test_imports(): @@ -22,5 +18,4 @@ def test_imports(): if __name__ == "__main__": - args, unknown = argparse.ArgumentParser().parse_known_args() - pytest.main([__file__, "--capture", "no", "--exitfirst"] + unknown) + test_imports()