From 89fe2eaab8b32bc6c4af868c426bf9a38bdd0a4b Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Tue, 4 Feb 2025 11:44:29 +0000 Subject: [PATCH] 0.2.0 Release (#491) --- .github/workflows/cpp_tests.yaml | 2 +- .github/workflows/docs.yaml | 10 +++++----- .github/workflows/lint.yaml | 2 +- .github/workflows/linux_cuda_wheel.yaml | 14 +++++++------- .github/workflows/linux_wheel.yaml | 14 +++++++------- .github/workflows/macos_wheel.yaml | 14 +++++++------- setup.py | 2 ++ version.txt | 2 +- 8 files changed, 31 insertions(+), 29 deletions(-) diff --git a/.github/workflows/cpp_tests.yaml b/.github/workflows/cpp_tests.yaml index b2b19a78..8daead6f 100644 --- a/.github/workflows/cpp_tests.yaml +++ b/.github/workflows/cpp_tests.yaml @@ -34,7 +34,7 @@ jobs: run: python -m pip install --upgrade pip - name: Install dependencies run: | - python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu + python -m pip install torch --index-url https://download.pytorch.org/whl/cpu - name: Install ffmpeg and pkg-config run: | conda install "ffmpeg=${{ matrix.ffmpeg-version-for-tests }}" pkg-config -c conda-forge diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 59ddf382..49c922ff 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -15,12 +15,12 @@ defaults: jobs: generate-matrix: - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@release/2.6-torchcodec with: package-type: wheel os: linux test-infra-repository: pytorch/test-infra - test-infra-ref: main + test-infra-ref: release/2.6-torchcodec with-cpu: disable with-xpu: disable with-rocm: disable @@ -31,12 +31,12 @@ jobs: strategy: fail-fast: false name: Build and Upload wheel - uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@main + uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@release/2.6-torchcodec with: repository: pytorch/torchcodec ref: "" test-infra-repository: pytorch/test-infra - test-infra-ref: main + test-infra-ref: release/2.6-torchcodec build-matrix: ${{ needs.generate-matrix.outputs.matrix }} post-script: packaging/post_build_script.sh smoke-test-script: packaging/fake_smoke_test.py @@ -93,7 +93,7 @@ jobs: run: ${CONDA_RUN} python -m pip install --upgrade pip - name: Install PyTorch run: | - ${CONDA_RUN} python -m pip install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu${{ env.cuda_version_without_periods }} + ${CONDA_RUN} python -m pip install torch torchvision --index-url https://download.pytorch.org/whl/cu${{ env.cuda_version_without_periods }} ${CONDA_RUN} python -c 'import torch; print(f"{torch.__version__}"); print(f"{torch.__file__}"); print(f"{torch.cuda.is_available()=}")' - name: Install torchcodec from the wheel run: | diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 71cc071c..4248c85a 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -62,7 +62,7 @@ jobs: run: python -m pip install --upgrade pip - name: Install dependencies and FFmpeg run: | - python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu + python -m pip install torch --index-url https://download.pytorch.org/whl/cpu conda install "ffmpeg=7.0.1" pkg-config -c conda-forge ffmpeg -version - name: Build and install torchcodec diff --git a/.github/workflows/linux_cuda_wheel.yaml b/.github/workflows/linux_cuda_wheel.yaml index 890e4a7f..385cb7b9 100644 --- a/.github/workflows/linux_cuda_wheel.yaml +++ b/.github/workflows/linux_cuda_wheel.yaml @@ -25,12 +25,12 @@ defaults: jobs: generate-matrix: - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@release/2.6-torchcodec with: package-type: wheel os: linux test-infra-repository: pytorch/test-infra - test-infra-ref: main + test-infra-ref: release/2.6-torchcodec with-cpu: disable with-xpu: disable with-rocm: disable @@ -41,12 +41,12 @@ jobs: strategy: fail-fast: false name: Build and Upload wheel - uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@main + uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@release/2.6-torchcodec with: repository: pytorch/torchcodec ref: "" test-infra-repository: pytorch/test-infra - test-infra-ref: main + test-infra-ref: release/2.6-torchcodec build-matrix: ${{ needs.generate-matrix.outputs.matrix }} post-script: packaging/post_build_script.sh smoke-test-script: packaging/fake_smoke_test.py @@ -65,10 +65,10 @@ jobs: # PR. # For the actual release we should add that label and change this to # include more python versions. - python-version: ['3.9'] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] cuda-version: ['11.8', '12.4', '12.6'] # TODO: put back ffmpeg 5 https://github.com/pytorch/torchcodec/issues/325 - ffmpeg-version-for-tests: ['6', '7'] + ffmpeg-version-for-tests: ['5', '6', '7'] container: image: "pytorch/manylinux2_28-builder:cuda${{ matrix.cuda-version }}" options: "--gpus all -e NVIDIA_DRIVER_CAPABILITIES=video,compute,utility" @@ -106,7 +106,7 @@ jobs: run: ${CONDA_RUN} python -m pip install --upgrade pip - name: Install PyTorch run: | - ${CONDA_RUN} python -m pip install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu${{ env.cuda_version_without_periods }} + ${CONDA_RUN} python -m pip install torch torchvision --index-url https://download.pytorch.org/whl/cu${{ env.cuda_version_without_periods }} ${CONDA_RUN} python -c 'import torch; print(f"{torch.__version__}"); print(f"{torch.__file__}"); print(f"{torch.cuda.is_available()=}")' - name: Install torchcodec from the wheel run: | diff --git a/.github/workflows/linux_wheel.yaml b/.github/workflows/linux_wheel.yaml index f5e665f5..319d362c 100644 --- a/.github/workflows/linux_wheel.yaml +++ b/.github/workflows/linux_wheel.yaml @@ -26,12 +26,12 @@ defaults: jobs: generate-matrix: - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@release/2.6-torchcodec with: package-type: wheel os: linux test-infra-repository: pytorch/test-infra - test-infra-ref: main + test-infra-ref: release/2.6-torchcodec with-xpu: disable with-rocm: disable with-cuda: disable @@ -42,12 +42,12 @@ jobs: strategy: fail-fast: false name: Build and Upload Linux wheel - uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@main + uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@release/2.6-torchcodec with: repository: pytorch/torchcodec ref: "" test-infra-repository: pytorch/test-infra - test-infra-ref: main + test-infra-ref: release/2.6-torchcodec build-matrix: ${{ needs.generate-matrix.outputs.matrix }} post-script: packaging/post_build_script.sh smoke-test-script: packaging/fake_smoke_test.py @@ -61,7 +61,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9'] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] ffmpeg-version-for-tests: ['4.4.2', '5.1.2', '6.1.1', '7.0.1'] needs: build steps: @@ -80,7 +80,7 @@ jobs: run: python -m pip install --upgrade pip - name: Install PyTorch run: | - python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu + python -m pip install torch --index-url https://download.pytorch.org/whl/cpu - name: Install torchcodec from the wheel run: | wheel_path=`find pytorch/torchcodec/dist -type f -name "*.whl"` @@ -103,7 +103,7 @@ jobs: - name: Install test dependencies run: | - python -m pip install --pre torchvision --index-url https://download.pytorch.org/whl/nightly/cpu + python -m pip install torchvision --index-url https://download.pytorch.org/whl/cpu # Ideally we would find a way to get those dependencies from pyproject.toml python -m pip install numpy pytest pillow diff --git a/.github/workflows/macos_wheel.yaml b/.github/workflows/macos_wheel.yaml index b7cc965e..82e5cdd1 100644 --- a/.github/workflows/macos_wheel.yaml +++ b/.github/workflows/macos_wheel.yaml @@ -26,12 +26,12 @@ defaults: jobs: generate-matrix: - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@release/2.6-torchcodec with: package-type: wheel os: macos-arm64 test-infra-repository: pytorch/test-infra - test-infra-ref: main + test-infra-ref: release/2.6-torchcodec with-xpu: disable with-rocm: disable with-cuda: disable @@ -42,12 +42,12 @@ jobs: strategy: fail-fast: false name: Build and Upload Mac wheel - uses: pytorch/test-infra/.github/workflows/build_wheels_macos.yml@main + uses: pytorch/test-infra/.github/workflows/build_wheels_macos.yml@release/2.6-torchcodec with: repository: pytorch/torchcodec ref: "" test-infra-repository: pytorch/test-infra - test-infra-ref: main + test-infra-ref: release/2.6-torchcodec build-matrix: ${{ needs.generate-matrix.outputs.matrix }} post-script: packaging/post_build_script.sh smoke-test-script: packaging/fake_smoke_test.py @@ -62,7 +62,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9'] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] ffmpeg-version-for-tests: ['4.4.2', '5.1.2', '6.1.1', '7.0.1'] needs: build steps: @@ -84,7 +84,7 @@ jobs: - name: Install PyTorch run: | - python -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu + python -m pip install torch --index-url https://download.pytorch.org/whl/cpu - name: Install torchcodec from the wheel run: | @@ -102,7 +102,7 @@ jobs: - name: Install test dependencies run: | - python -m pip install --pre torchvision --index-url https://download.pytorch.org/whl/nightly/cpu + python -m pip install torchvision --index-url https://download.pytorch.org/whl/cpu python -m pip install numpy pytest pillow - name: Delete the src/ folder just for fun diff --git a/setup.py b/setup.py index 9120c7fe..80d7d63d 100644 --- a/setup.py +++ b/setup.py @@ -178,12 +178,14 @@ def _write_version_files(): # the content of `version.txt` plus some suffix like "+cpu" or "+cu112". # See # https://github.com/pytorch/test-infra/blob/61e6da7a6557152eb9879e461a26ad667c15f0fd/tools/pkg-helpers/pytorch_pkg_helpers/version.py#L113 + version = version.replace("+cpu", "") with open(_ROOT_DIR / "version.txt", "w") as f: f.write(f"{version}") else: with open(_ROOT_DIR / "version.txt") as f: version = f.readline().strip() try: + version = version.replace("+cpu", "") sha = ( subprocess.check_output( ["git", "rev-parse", "HEAD"], cwd=str(_ROOT_DIR) diff --git a/version.txt b/version.txt index db5a1c4b..0ea3a944 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.1.2a0 +0.2.0