diff --git a/.github/workflows/_example_tests_runner.yml b/.github/workflows/_example_tests_runner.yml index caed08c3a..6977ace63 100644 --- a/.github/workflows/_example_tests_runner.yml +++ b/.github/workflows/_example_tests_runner.yml @@ -62,6 +62,13 @@ jobs: # Uninstall conflicting system-wide installed modelopt in nemo containers pip uninstall -y nvidia-modelopt || true + # nvcr.io/nvidia/tensorrt:26.05-py3 ships cuDNN 9.22 with no preinstalled torch, and + # torch 2.14 pins cuDNN 9.24: mixing them fails with CUDNN_SUBLIBRARY_LOADING_FAILED. + if [[ "${{ inputs.docker_image }}" == *"/tensorrt:"* ]]; then + echo "torch<2.14" > /tmp/pip-constraints.txt + export PIP_CONSTRAINT=/tmp/pip-constraints.txt + fi + # Use `python -m pip` instead of `pip` to avoid conflicts with system pip for nemo containers # Editable install so example scripts launched as subprocesses resolve modelopt to the same source path as the test process python -m pip install -e ".${{ inputs.pip_install_extras }}" diff --git a/.github/workflows/code_quality.yml b/.github/workflows/code_quality.yml index 3a53f7ae3..e1e0f010a 100644 --- a/.github/workflows/code_quality.yml +++ b/.github/workflows/code_quality.yml @@ -29,4 +29,10 @@ jobs: # verified. Only nightly sees them, since it scans all history while PRs scan their diff. extra_args: --results=verified,unknown --exclude-detectors=lob - name: Run code quality checks - run: pip install nox uv && nox -s pre_commit_all + run: | + # torch 2.14 breaks this env: torchvision::nms fails to register, which disables + # modelopt's transformers plugin and takes the ARGUMENTS.md hook down with it. + echo "torch<2.14" > /tmp/pip-constraints.txt + # Both: nox builds the session venv with uv, which reads UV_CONSTRAINT, not PIP_CONSTRAINT. + export PIP_CONSTRAINT=/tmp/pip-constraints.txt UV_CONSTRAINT=/tmp/pip-constraints.txt + pip install nox uv && nox -s pre_commit_all diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index de12b5c8b..002a08850 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v6 - uses: ./.github/actions/ubuntu-setup - name: Run basic unit tests - run: pip install nox uv && nox -s "unit-3.12(torch_212, tf_latest)" + run: pip install nox uv && nox -s "unit-3.12(torch_214, tf_latest)" - name: Build Wheel run: | nox -s build_wheel diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 4fbbd9a9e..2ad1b02b8 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -67,7 +67,7 @@ jobs: env: COVERAGE_PROCESS_START: ${{ github.workspace }}/pyproject.toml COVERAGE_FILE: ${{ github.workspace }}/.coverage - run: pip install nox uv && nox -s "unit-3.12(torch_213, tf_latest)" + run: pip install nox uv && nox -s "unit-3.12(torch_214, tf_latest)" - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v7 with: @@ -92,7 +92,7 @@ jobs: with: python-version: "3.12" - name: Run unit tests (without coverage) - run: pip install nox uv && nox -s "unit-3.12(torch_213, tf_latest)" + run: pip install nox uv && nox -s "unit-3.12(torch_214, tf_latest)" multi-version: if: needs.check-file-changes.outputs.any_changed == 'true' needs: [linux, check-file-changes] @@ -102,19 +102,20 @@ jobs: fail-fast: false matrix: include: - # Default torch (2.13) across the other supported Python versions - - {nox_session: "unit-3.10(torch_213, tf_latest)", python_version: "3.10"} - - {nox_session: "unit-3.11(torch_213, tf_latest)", python_version: "3.11"} - - {nox_session: "unit-3.13(torch_213, tf_latest)", python_version: "3.13"} - - {nox_session: "unit-3.14(torch_213, tf_latest)", python_version: "3.14"} + # Default torch (2.14) across the other supported Python versions + - {nox_session: "unit-3.10(torch_214, tf_latest)", python_version: "3.10"} + - {nox_session: "unit-3.11(torch_214, tf_latest)", python_version: "3.11"} + - {nox_session: "unit-3.13(torch_214, tf_latest)", python_version: "3.13"} + - {nox_session: "unit-3.14(torch_214, tf_latest)", python_version: "3.14"} # Older torch versions on the default Python (3.12) for back-compat. - {nox_session: "unit-3.12(torch_28, tf_latest)", python_version: "3.12"} - {nox_session: "unit-3.12(torch_29, tf_latest)", python_version: "3.12"} - {nox_session: "unit-3.12(torch_210, tf_latest)", python_version: "3.12"} - {nox_session: "unit-3.12(torch_211, tf_latest)", python_version: "3.12"} - {nox_session: "unit-3.12(torch_212, tf_latest)", python_version: "3.12"} + - {nox_session: "unit-3.12(torch_213, tf_latest)", python_version: "3.12"} # Minimum supported transformers on the default torch. - - {nox_session: "unit-3.12(torch_213, tf_min)", python_version: "3.12"} + - {nox_session: "unit-3.12(torch_214, tf_min)", python_version: "3.12"} steps: - uses: actions/checkout@v6 - uses: ./.github/actions/ubuntu-setup diff --git a/noxfile.py b/noxfile.py index df928b5d8..135465ed4 100644 --- a/noxfile.py +++ b/noxfile.py @@ -40,6 +40,7 @@ TORCH_VERSIONS = { "torch_211": "torchvision~=0.26.0", "torch_212": "torchvision~=0.27.0", "torch_213": "torchvision~=0.28.0", + "torch_214": "torchvision~=0.29.0", } # Extra install pins applied per transformers matrix entry (installed after the base