mirror of
https://github.com/NVIDIA/Model-Optimizer.git
synced 2026-10-02 03:14:52 +08:00
- Transformers upper bound bumped from `<5.8` to `<5.10` - Enable torch 2.12 CICD testing - Bump TRT-LLM container to `1.3.0rc16` (transformers 5.5) - Use pytorch and tensorrt 26.04 containers in CICD <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated CI test container images and targeted Torch version across workflows; adjusted release CI job to use the newer torch config. * Broadened Transformers constraint in project metadata and test/dev pins. * Removed strict transformers pins from example requirements and lifted a compression dependency cap. * Raised the import-time Transformers version threshold for compatibility warnings. * **Tests** * Refactored a GPU test to collect and report validation errors and updated numeric expected baselines. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/NVIDIA/Model-Optimizer/pull/1554?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
127 lines
4.4 KiB
YAML
127 lines
4.4 KiB
YAML
name: Example tests
|
|
|
|
on:
|
|
push:
|
|
branches: ["pull-request/[0-9]+"]
|
|
# NOTE: paths cannot be used since push happens to copied PR and only latest commit to PR is used
|
|
schedule:
|
|
- cron: "0 0 * * *" # Nightly
|
|
workflow_dispatch:
|
|
# On-demand
|
|
|
|
concurrency:
|
|
# Cancel previous runs if new commit is pushed to the same PR
|
|
group: ${{ github.workflow }}-${{ startsWith(github.ref, 'refs/heads/pull-request/') && github.ref || github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
pr-gate:
|
|
uses: ./.github/workflows/_pr_gate.yml
|
|
permissions:
|
|
checks: read
|
|
secrets: inherit
|
|
with:
|
|
files: |
|
|
.github/workflows/example_tests.yml
|
|
examples/**
|
|
modelopt/**
|
|
pyproject.toml
|
|
tests/examples/**
|
|
|
|
##### PyTorch Example Tests (speculative_decoding requires 26.01 image) #####
|
|
torch:
|
|
needs: [pr-gate]
|
|
if: needs.pr-gate.outputs.any_changed == 'true'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
example: [llm_distill, llm_qat, llm_sparsity, diffusers_sparsity, specdec_bench]
|
|
include:
|
|
- example: speculative_decoding
|
|
docker_image: "26.01"
|
|
uses: ./.github/workflows/_example_tests_runner.yml
|
|
secrets: inherit
|
|
with:
|
|
docker_image: "nvcr.io/nvidia/pytorch:${{ matrix.docker_image || '26.04' }}-py3"
|
|
example: ${{ matrix.example }}
|
|
timeout_minutes: 30
|
|
pip_install_extras: "[hf,dev-test]"
|
|
runner: ${{ startsWith(github.ref, 'refs/heads/pull-request/') && 'linux-amd64-gpu-rtxpro6000-latest-1' || 'linux-amd64-gpu-rtxpro6000-latest-2' }}
|
|
|
|
##### TensorRT-LLM Example Tests (pr/non-pr split: non-pr runs extra autodeploy+eval examples) #####
|
|
trtllm-pr:
|
|
needs: [pr-gate]
|
|
if: startsWith(github.ref, 'refs/heads/pull-request/') && needs.pr-gate.outputs.any_changed == 'true'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
example: [llm_ptq, vlm_ptq]
|
|
uses: ./.github/workflows/_example_tests_runner.yml
|
|
secrets: inherit
|
|
with:
|
|
docker_image: "nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc16"
|
|
example: ${{ matrix.example }}
|
|
pip_install_extras: "[hf,dev-test]"
|
|
runner: linux-amd64-gpu-rtxpro6000-latest-1
|
|
|
|
trtllm-non-pr:
|
|
if: ${{ !startsWith(github.ref, 'refs/heads/pull-request/') }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
example: [llm_autodeploy, llm_eval, llm_ptq, vlm_ptq]
|
|
uses: ./.github/workflows/_example_tests_runner.yml
|
|
secrets: inherit
|
|
with:
|
|
docker_image: "nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc16"
|
|
example: ${{ matrix.example }}
|
|
pip_install_extras: "[hf,dev-test]"
|
|
runner: linux-amd64-gpu-rtxpro6000-latest-2
|
|
|
|
##### Megatron Example Tests #####
|
|
megatron:
|
|
needs: [pr-gate]
|
|
if: needs.pr-gate.outputs.any_changed == 'true'
|
|
uses: ./.github/workflows/_example_tests_runner.yml
|
|
secrets: inherit
|
|
with:
|
|
docker_image: "nvcr.io/nvidia/nemo:26.04"
|
|
example: megatron_bridge
|
|
timeout_minutes: 30
|
|
pip_install_extras: "[hf,puzzletron,dev-test]"
|
|
runner: ${{ startsWith(github.ref, 'refs/heads/pull-request/') && 'linux-amd64-gpu-rtxpro6000-latest-1' || 'linux-amd64-gpu-rtxpro6000-latest-2' }}
|
|
|
|
##### ONNX/TensorRT Example Tests #####
|
|
onnx:
|
|
needs: [pr-gate]
|
|
if: needs.pr-gate.outputs.any_changed == 'true'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
example: [diffusers, torch_onnx]
|
|
uses: ./.github/workflows/_example_tests_runner.yml
|
|
secrets: inherit
|
|
with:
|
|
docker_image: "nvcr.io/nvidia/tensorrt:26.04-py3"
|
|
example: ${{ matrix.example }}
|
|
pip_install_extras: "[onnx,hf,dev-test]"
|
|
runner: ${{ startsWith(github.ref, 'refs/heads/pull-request/') && 'linux-amd64-gpu-rtxpro6000-latest-1' || 'linux-amd64-gpu-rtxpro6000-latest-2' }}
|
|
|
|
##### Required Check for PR #####
|
|
example-pr-required-check:
|
|
# Run even if example tests are skipped
|
|
if: ${{ startsWith(github.ref, 'refs/heads/pull-request/') && always() }}
|
|
needs: [pr-gate, torch, trtllm-pr, megatron, onnx]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Required example tests did not succeed
|
|
if: |
|
|
needs.pr-gate.result != 'success' ||
|
|
(needs.pr-gate.outputs.any_changed == 'true' && (
|
|
needs.torch.result != 'success' ||
|
|
needs.trtllm-pr.result != 'success' ||
|
|
needs.megatron.result != 'success' ||
|
|
needs.onnx.result != 'success'
|
|
))
|
|
run: exit 1
|