-
Notifications
You must be signed in to change notification settings - Fork 162
Add llm_ptq PR test, Cleanup dependency installation in modelopt docker #338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# NOTE: Make sure this file is consistent with .gitlab/tests.yml | ||
name: E2E 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 | ||
|
||
# Cancel previous runs if new commit is pushed to the same PR | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ startsWith(github.ref, 'refs/heads/pull-request/') && github.ref || github.sha }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check-file-changes: | ||
if: startsWith(github.ref, 'refs/heads/pull-request/') | ||
runs-on: ubuntu-latest | ||
outputs: | ||
any_changed: ${{ steps.changed-tests.outputs.any_changed }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- id: get-pr-info | ||
uses: nv-gha-runners/get-pr-info@main | ||
# Get commit from main branch that is present in the PR to use as base for changed files | ||
- id: calculate-merge-base | ||
env: | ||
PR_SHA: ${{ fromJSON(steps.get-pr-info.outputs.pr-info).head.sha }} | ||
BASE_SHA: ${{ fromJSON(steps.get-pr-info.outputs.pr-info).base.sha }} | ||
run: | | ||
(echo -n "merge-base="; git merge-base "$BASE_SHA" "$PR_SHA") | tee --append "${GITHUB_OUTPUT}" | ||
- name: Check for changes in test-relevant directories | ||
id: changed-tests | ||
uses: step-security/[email protected] | ||
with: | ||
base_sha: ${{ steps.calculate-merge-base.outputs.merge-base }} | ||
sha: ${{ fromJSON(steps.get-pr-info.outputs.pr-info).head.sha }} | ||
files: | | ||
.github/workflows/example_tests.yml | ||
examples/llm_ptq/** | ||
modelopt/torch/** | ||
tests/examples/llm_ptq/** | ||
setup.py | ||
fail_on_initial_diff_error: true | ||
wait-checks: | ||
needs: [check-file-changes] | ||
if: needs.check-file-changes.outputs.any_changed == 'true' | ||
uses: ./.github/workflows/_wait_for_checks.yml | ||
permissions: | ||
checks: read | ||
secrets: inherit | ||
with: | ||
match_pattern: '^DCO$|^linux$' # Wait for DCO and Unit tests / linux to pass | ||
delay: 300s | ||
example-tests-pr: | ||
needs: [check-file-changes, wait-checks] | ||
if: needs.check-file-changes.outputs.any_changed == 'true' | ||
# Runner list at https://github.com/nv-gha-runners/enterprise-runner-configuration/blob/main/docs/runner-groups.md | ||
runs-on: linux-amd64-gpu-h100-latest-1 | ||
timeout-minutes: 90 | ||
kevalmorabia97 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
strategy: | ||
matrix: | ||
EXAMPLE: [llm_ptq] | ||
container: &example_container | ||
image: nvcr.io/nvidia/tensorrt-llm/release:1.1.0rc2.post2 | ||
env: | ||
LD_LIBRARY_PATH: "/usr/lib/x86_64-linux-gnu:/usr/local/tensorrt/targets/x86_64-linux-gnu/lib:${LD_LIBRARY_PATH}" | ||
# PATH: "/usr/local/tensorrt/targets/x86_64-linux-gnu/bin:${PATH}" | ||
PIP_CONSTRAINT: "" # Disable pip constraint for upgrading packages | ||
steps: &example_steps | ||
- uses: actions/checkout@v4 | ||
- uses: nv-gha-runners/setup-proxy-cache@main | ||
- name: Run example tests | ||
run: | | ||
pip install ".[all,dev-test]" | ||
find examples/${{ matrix.EXAMPLE }} -name "requirements.txt" | while read req_file; do pip install -r "$req_file" || exit 1; done | ||
pytest -s tests/examples/${{ matrix.EXAMPLE }} | ||
example-tests-non-pr: | ||
if: ${{ !startsWith(github.ref, 'refs/heads/pull-request/') }} | ||
# Runner list at https://github.com/nv-gha-runners/enterprise-runner-configuration/blob/main/docs/runner-groups.md | ||
runs-on: linux-amd64-gpu-h100-latest-1 | ||
timeout-minutes: 90 | ||
strategy: | ||
matrix: | ||
EXAMPLE: [llm_ptq] | ||
container: *example_container | ||
steps: *example_steps | ||
kevalmorabia97 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
example-pr-required-check: | ||
# Run even if example-tests-pr is skipped | ||
if: ${{ startsWith(github.ref, 'refs/heads/pull-request/') && always() }} | ||
needs: [check-file-changes, example-tests-pr] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Required GPU tests did not succeed | ||
if: ${{ needs.check-file-changes.result != 'success' || (needs.check-file-changes.outputs.any_changed == 'true' && needs.example-tests-pr.result != 'success') }} | ||
run: exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
torchvision |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ datasets>=2.14.4 | |
optimum | ||
sentencepiece | ||
timm | ||
torchvision |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.