-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test (example/llm): Refactor and add basic tests for the LLM entry-po…
…int (#1002)
- Loading branch information
1 parent
b5606b2
commit f58f64b
Showing
10 changed files
with
884 additions
and
173 deletions.
There are no files selected for viewing
This file contains 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,65 @@ | ||
name: Examples LLM Pytest | ||
|
||
on: | ||
push: | ||
branches: [ master, dev ] | ||
pull_request: | ||
types: | ||
- review_requested | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.platform }} | ||
strategy: | ||
fail-fast: false | ||
|
||
|
||
matrix: | ||
python_version: ['3.8', '3.9'] | ||
pytorch_version: ['2.2.2', '2.3.1', '2.4.0'] | ||
platform: ['windows-latest', 'ubuntu-latest', 'macos-latest'] | ||
jit_status: ['jit_disabled', 'jit_enabled'] | ||
|
||
|
||
exclude: | ||
- pytorch_version: '1.9.1' | ||
platform: 'macos-latest' | ||
|
||
- pytorch_version: '1.9.1' | ||
jit_status: 'jit_enabled' | ||
|
||
|
||
|
||
if: ${{ !github.event.pull_request.draft }} | ||
steps: | ||
|
||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python_version }} | ||
|
||
- name: Install Nox dependencies | ||
shell: bash | ||
run: pip install -r requirements/requirements-nox.txt | ||
|
||
- name: Install update | ||
shell: bash | ||
run: sudo apt-get update | ||
if: startsWith(runner.os, 'Linux') == true | ||
|
||
- name: Install libsndfile and libgomp1 on Ubuntu | ||
shell: bash | ||
run: sudo apt-get install -y libsndfile-dev libgomp1 | ||
if: startsWith(runner.os, 'Linux') == true | ||
|
||
- name: Install libomp on macOS | ||
shell: bash | ||
run: brew install libomp | ||
if: startsWith(runner.os, 'macOS') == true | ||
|
||
- name: Run Nox session for brevitas_examples pytest | ||
shell: bash | ||
run: nox -v -s tests_brevitas_examples_llm-${{ matrix.python_version }}\(${{ matrix.jit_status }}\,\ pytorch_${{ matrix.pytorch_version }}\) |
This file contains 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 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,64 @@ | ||
name: Examples LLM Pytest | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.platform }} | ||
strategy: | ||
fail-fast: false | ||
|
||
|
||
matrix: | ||
python_version: ['3.8'] | ||
pytorch_version: ['2.4.0'] | ||
platform: ['ubuntu-latest'] | ||
jit_status: ['jit_disabled'] | ||
|
||
|
||
exclude: | ||
- pytorch_version: '1.9.1' | ||
platform: 'macos-latest' | ||
|
||
|
||
|
||
if: ${{ !github.event.pull_request.draft }} | ||
steps: | ||
|
||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python_version }} | ||
|
||
- name: Install Nox dependencies | ||
shell: bash | ||
run: pip install -r requirements/requirements-nox.txt | ||
|
||
- name: Install update | ||
shell: bash | ||
run: sudo apt-get update | ||
if: startsWith(runner.os, 'Linux') == true | ||
|
||
- name: Install libsndfile and libgomp1 on Ubuntu | ||
shell: bash | ||
run: sudo apt-get install -y libsndfile-dev libgomp1 | ||
if: startsWith(runner.os, 'Linux') == true | ||
|
||
- name: Install libomp on macOS | ||
shell: bash | ||
run: brew install libomp | ||
if: startsWith(runner.os, 'macOS') == true | ||
|
||
- name: Run Nox session for brevitas_examples pytest | ||
shell: bash | ||
run: nox -v -s tests_brevitas_examples_llm-${{ matrix.python_version }}\(${{ matrix.jit_status }}\,\ pytorch_${{ matrix.pytorch_version }}\) |
This file contains 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 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 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,3 @@ | ||
optimum-amd[brevitas] @ git+https://github.com/huggingface/optimum-amd.git@main | ||
tqdm | ||
transformers |
This file contains 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 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.