Skip to content

Commit d44fb7e

Browse files
cleanup
Signed-off-by: Keval Morabia <[email protected]>
1 parent 9ada98e commit d44fb7e

File tree

8 files changed

+109
-22
lines changed

8 files changed

+109
-22
lines changed

.github/workflows/code_quality.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515
jobs:
1616
code-quality:
1717
runs-on: ubuntu-latest
18-
timeout-minutes: 15
18+
timeout-minutes: 30
1919
steps:
2020
- uses: actions/checkout@v4
2121
- uses: actions/setup-python@v5
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# NOTE: Make sure this file is consistent with .gitlab/tests.yml
2+
name: E2E Example tests
3+
4+
on:
5+
push:
6+
branches: ["pull-request/[0-9]+"]
7+
# NOTE: paths cannot be used since push happens to copied PR and only latest commit to PR is used
8+
schedule:
9+
- cron: "0 0 * * *" # Nightly
10+
workflow_dispatch: # On-demand
11+
12+
# Cancel previous runs if new commit is pushed to the same PR
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ startsWith(github.ref, 'refs/heads/pull-request/') && github.ref || github.sha }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
check-file-changes:
19+
if: startsWith(github.ref, 'refs/heads/pull-request/')
20+
runs-on: ubuntu-latest
21+
outputs:
22+
any_changed: ${{ steps.changed-tests.outputs.any_changed }}
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
- id: get-pr-info
28+
uses: nv-gha-runners/get-pr-info@main
29+
# Get commit from main branch that is present in the PR to use as base for changed files
30+
- id: calculate-merge-base
31+
env:
32+
PR_SHA: ${{ fromJSON(steps.get-pr-info.outputs.pr-info).head.sha }}
33+
BASE_SHA: ${{ fromJSON(steps.get-pr-info.outputs.pr-info).base.sha }}
34+
run: |
35+
(echo -n "merge-base="; git merge-base "$BASE_SHA" "$PR_SHA") | tee --append "${GITHUB_OUTPUT}"
36+
- name: Check for changes in test-relevant directories
37+
id: changed-tests
38+
uses: step-security/[email protected]
39+
with:
40+
base_sha: ${{ steps.calculate-merge-base.outputs.merge-base }}
41+
sha: ${{ fromJSON(steps.get-pr-info.outputs.pr-info).head.sha }}
42+
files: |
43+
.github/workflows/example_tests.yml
44+
examples/llm_ptq/**
45+
modelopt/torch/**
46+
tests/examples/llm_ptq/**
47+
setup.py
48+
fail_on_initial_diff_error: true
49+
wait-checks:
50+
needs: [check-file-changes]
51+
if: needs.check-file-changes.outputs.any_changed == 'true'
52+
uses: ./.github/workflows/_wait_for_checks.yml
53+
permissions:
54+
checks: read
55+
secrets: inherit
56+
with:
57+
match_pattern: '^DCO$|^linux$' # Wait for DCO and Unit tests / linux to pass
58+
delay: 300s
59+
example-tests-pr:
60+
needs: [check-file-changes, wait-checks]
61+
if: needs.check-file-changes.outputs.any_changed == 'true'
62+
# Runner list at https://github.com/nv-gha-runners/enterprise-runner-configuration/blob/main/docs/runner-groups.md
63+
runs-on: linux-amd64-gpu-h100-latest-1
64+
timeout-minutes: 90
65+
strategy:
66+
matrix:
67+
EXAMPLE: [llm_ptq]
68+
container: &example_container
69+
image: nvcr.io/nvidia/tensorrt-llm/release:1.1.0rc2.post2
70+
env:
71+
LD_LIBRARY_PATH: "/usr/lib/x86_64-linux-gnu:/usr/local/tensorrt/targets/x86_64-linux-gnu/lib:${LD_LIBRARY_PATH}"
72+
# PATH: "/usr/local/tensorrt/targets/x86_64-linux-gnu/bin:${PATH}"
73+
PIP_CONSTRAINT: "" # Disable pip constraint for upgrading packages
74+
steps: &example_steps
75+
- uses: actions/checkout@v4
76+
- uses: nv-gha-runners/setup-proxy-cache@main
77+
- name: Run example tests
78+
run: |
79+
pip install ".[all]"
80+
find examples/$EXAMPLE -name "requirements.txt" | while read req_file; do pip install -r "$req_file" || exit 1; done
81+
pytest -s tests/examples/$EXAMPLE
82+
example-tests-non-pr:
83+
if: ${{ !startsWith(github.ref, 'refs/heads/pull-request/') }}
84+
# Runner list at https://github.com/nv-gha-runners/enterprise-runner-configuration/blob/main/docs/runner-groups.md
85+
runs-on: linux-amd64-gpu-h100-latest-1
86+
timeout-minutes: 90
87+
strategy:
88+
matrix:
89+
EXAMPLE: [llm_ptq]
90+
container: *example_container
91+
steps: *example_steps
92+
example-pr-required-check:
93+
# Run even if example-tests-pr is skipped
94+
if: ${{ startsWith(github.ref, 'refs/heads/pull-request/') && always() }}
95+
needs: [check-file-changes, example-tests-pr]
96+
runs-on: ubuntu-latest
97+
steps:
98+
- name: Required GPU tests did not succeed
99+
if: ${{ needs.check-file-changes.result != 'success' || (needs.check-file-changes.outputs.any_changed == 'true' && needs.example-tests-pr.result != 'success') }}
100+
run: exit 1

.github/workflows/gpu_tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ jobs:
4444
modelopt/**
4545
tests/gpu/**
4646
tox.ini
47-
pyproject.toml
4847
setup.py
4948
fail_on_initial_diff_error: true
5049
wait-checks:

.github/workflows/pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ permissions:
2323
jobs:
2424
build-docs:
2525
runs-on: ubuntu-latest
26-
timeout-minutes: 15
26+
timeout-minutes: 30
2727
steps:
2828
- uses: actions/checkout@v4
2929
- uses: actions/setup-python@v5

.github/workflows/unit_tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ on:
1010
- ".github/workflows/unit_tests.yml"
1111
- "modelopt/**"
1212
- "tests/unit/**"
13-
- "pyproject.toml"
1413
- "setup.py"
1514
- "tox.ini"
1615
schedule:

.gitlab/tests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,24 +49,24 @@ example:
4949
tags: [docker, linux, 2-gpu, sm<89]
5050
parallel:
5151
matrix:
52-
- TEST: [diffusers, llm_distill, llm_qat, llm_sparsity, onnx_ptq, speculative_decoding]
52+
- EXAMPLE: [diffusers, llm_distill, llm_qat, llm_sparsity, onnx_ptq, speculative_decoding]
5353
allow_failure: true # Allow to continue next stages even if job is canceled (e.g. during release)
5454
before_script:
5555
- pip install ".[all]" -U
5656
script:
5757
# Uninstall apex since T5 Int8 (PixArt) + Apex is not supported as per https://github.com/huggingface/transformers/issues/21391
58-
- if [ "$TEST" = "diffusers" ]; then pip uninstall -y apex; fi
59-
- if [ -f examples/$TEST/requirements.txt ]; then pip install -r examples/$TEST/requirements.txt; fi
60-
- if [ "$TEST_TYPE" = "pytest" ]; then pytest -s tests/examples/$TEST; else bash tests/examples/test_$TEST.sh; fi
58+
- if [ "$EXAMPLE" = "diffusers" ]; then pip uninstall -y apex; fi
59+
- find examples/$EXAMPLE -name "requirements.txt" | while read req_file; do pip install -r "$req_file" || exit 1; done
60+
- if [ "$TEST_TYPE" = "pytest" ]; then pytest -s tests/examples/$EXAMPLE; else bash tests/examples/test_$EXAMPLE.sh; fi
6161

6262
example-ada:
6363
extends: example
6464
timeout: 60m
6565
tags: [docker, linux, 2-gpu, sm>=89]
6666
parallel:
6767
matrix:
68-
- TEST: [llm_eval, llm_ptq, vlm_ptq, llm_autodeploy]
69-
- TEST: [onnx_ptq]
68+
- EXAMPLE: [llm_eval, llm_ptq, vlm_ptq, llm_autodeploy]
69+
- EXAMPLE: [onnx_ptq]
7070
TEST_TYPE: bash
7171

7272
##### Megatron / NeMo Integration Tests #####

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ARG PIP_EXTRA_INDEX_URL="https://pypi.nvidia.com"
44
ENV PIP_EXTRA_INDEX_URL=$PIP_EXTRA_INDEX_URL \
55
PIP_NO_CACHE_DIR=off \
66
PIP_CONSTRAINT= \
7-
TORCH_CUDA_ARCH_LIST="8.0 8.6 8.7 8.9 9.0 10.0+PTX"
7+
TORCH_CUDA_ARCH_LIST="8.0 8.6 8.7 8.9 9.0 10.0 12.0+PTX"
88

99
RUN apt-get update && \
1010
apt-get install -y libgl1 && \

tests/examples/speculative_decoding/test_medusa.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
import subprocess
1716

18-
import pytest
1917
from _test_utils.examples.run_command import run_example_command
2018

2119

22-
# TODO: Medusa QAT FSDP test hangs if transformers>=4.50
23-
@pytest.fixture(scope="session", autouse=True)
24-
def install_transformers_lt_4_50():
25-
subprocess.run(
26-
["pip", "install", "transformers<4.50"],
27-
check=True,
28-
)
29-
30-
3120
# fmt: off
3221
def _run_hf_ptq(model_path, output_dir, qformat):
3322
run_example_command(

0 commit comments

Comments
 (0)