Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into add_llava
Browse files Browse the repository at this point in the history
  • Loading branch information
mht-sharma committed May 29, 2024
2 parents 9e6292a + cbbda3e commit 78c4287
Show file tree
Hide file tree
Showing 65 changed files with 1,362 additions and 277 deletions.
10 changes: 10 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,13 @@ Fixes # (issue)
- [ ] Did you make sure to update the documentation with your changes?
- [ ] Did you write any new necessary tests?

## Who can review?

<!--
For faster review, we strongly recommend you to ping the following people:
- ONNX / ONNX Runtime : @fxmarty, @echarlaix, @JingyaHuang, @michaelbenayoun
- ONNX Runtime Training: @JingyaHuang
- BetterTransformer: @fxmarty
- GPTQ, quantization: @fxmarty, @SunMarc
- TFLite export: @michaelbenayoun
-->
20 changes: 18 additions & 2 deletions .github/workflows/build_main_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,14 @@ jobs:
repository: 'huggingface/optimum-amd'
path: optimum-amd

- uses: actions/checkout@v2
with:
repository: 'huggingface/optimum-tpu'
path: optimum-tpu

- name: Free disk space
run: |
df -h
sudo apt-get update
sudo apt-get purge -y '^apache.*'
sudo apt-get purge -y '^imagemagick.*'
sudo apt-get purge -y '^dotnet.*'
Expand Down Expand Up @@ -133,6 +137,8 @@ jobs:
run: |
cd optimum-furiosa
pip install .
sudo apt install software-properties-common
sudo add-apt-repository --remove https://packages.microsoft.com/ubuntu/22.04/prod
sudo apt update
sudo apt install -y ca-certificates apt-transport-https gnupg
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 5F03AFA423A751913F249259814F888B20B09A7E
Expand All @@ -150,6 +156,16 @@ jobs:
mv furiosa-doc-build ../optimum
cd ..
- name: Make TPU documentation
run: |
sudo docker system prune -a -f
cd optimum-tpu
pip install -U pip
pip install . -f https://storage.googleapis.com/libtpu-releases/index.html
doc-builder build optimum.tpu docs/source/ --build_dir tpu-doc-build --version pr_$PR_NUMBER --version_tag_suffix "" --html --clean
mv tpu-doc-build ../optimum
cd ..
- name: Make AMD documentation
run: |
sudo docker system prune -a -f
Expand All @@ -171,7 +187,7 @@ jobs:
- name: Combine subpackage documentation
run: |
cd optimum
sudo python docs/combine_docs.py --subpackages nvidia amd intel neuron habana furiosa --version ${{ env.VERSION }}
sudo python docs/combine_docs.py --subpackages nvidia amd intel neuron tpu habana furiosa --version ${{ env.VERSION }}
cd ..
- name: Push to repositories
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/build_pr_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ jobs:
repository: 'huggingface/optimum-amd'
path: optimum-amd

- uses: actions/checkout@v2
with:
repository: 'huggingface/optimum-tpu'
path: optimum-tpu

- name: Setup environment
run: |
pip uninstall -y doc-builder
Expand Down Expand Up @@ -91,6 +96,16 @@ jobs:
sudo mv amd-doc-build ../optimum
cd ..
- name: Make TPU documentation
run: |
sudo docker system prune -a -f
cd optimum-tpu
pip install -U pip
pip install . -f https://storage.googleapis.com/libtpu-releases/index.html
doc-builder build optimum.tpu docs/source/ --build_dir tpu-doc-build --version pr_$PR_NUMBER --version_tag_suffix "" --html --clean
mv tpu-doc-build ../optimum
cd ..
- name: Make Optimum documentation
run: |
sudo docker system prune -a -f
Expand All @@ -101,7 +116,7 @@ jobs:
- name: Combine subpackage documentation
run: |
cd optimum
sudo python docs/combine_docs.py --subpackages nvidia amd intel neuron habana furiosa --version pr_$PR_NUMBER
sudo python docs/combine_docs.py --subpackages nvidia amd intel neuron tpu habana furiosa --version pr_$PR_NUMBER
sudo mv optimum-doc-build ../
cd ..
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dev_test_bettertransformer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- 3.8
os:
- ubuntu-20.04
- macos-latest
- macos-13
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand All @@ -35,4 +35,4 @@ jobs:
- name: Test with unittest
working-directory: tests
run: |
python -m unittest discover -s bettertransformer -p test_*.py
python -m unittest discover -s bettertransformer -p test_*.py
4 changes: 2 additions & 2 deletions .github/workflows/dev_test_dummy_inputs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- 3.9
os:
- ubuntu-20.04
- macos-latest
- macos-13
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand All @@ -35,4 +35,4 @@ jobs:
- name: Test with unittest
working-directory: tests
run: |
python -m unittest discover -s utils -p test_*.py
python -m unittest discover -s utils -p test_*.py
4 changes: 2 additions & 2 deletions .github/workflows/dev_test_fx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- 3.9
os:
- ubuntu-20.04
- macos-latest
- macos-13
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand All @@ -35,4 +35,4 @@ jobs:
- name: Test with unittest
working-directory: tests
run: |
python -m pytest fx/optimization/test_transformations.py --exitfirst
python -m pytest fx/optimization/test_transformations.py --exitfirst
4 changes: 2 additions & 2 deletions .github/workflows/dev_test_onnx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- 3.9
os:
- ubuntu-20.04
- macos-latest
- macos-13
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand All @@ -34,4 +34,4 @@ jobs:
- name: Test with unittest
working-directory: tests
run: |
python -m unittest discover -s onnx -p test_*.py
python -m unittest discover -s onnx -p test_*.py
4 changes: 2 additions & 2 deletions .github/workflows/dev_test_onnxruntime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
os:
- ubuntu-20.04
- windows-2019
- macos-latest
- macos-13
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand All @@ -36,4 +36,4 @@ jobs:
working-directory: tests
run: |
python -m pytest -n auto -m "not run_in_series" onnxruntime
python -m pytest -m "run_in_series" onnxruntime
python -m pytest -m "run_in_series" onnxruntime
4 changes: 2 additions & 2 deletions .github/workflows/dev_test_optimum_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
os:
- ubuntu-20.04
- windows-2019
- macos-latest
- macos-13
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand All @@ -42,4 +42,4 @@ jobs:
as the staging tests cannot run in parallel.
export HUGGINGFACE_CO_STAGING=${{ matrix.python-version == 3.8 && matrix.os
== ubuntu-20.04 }}
python -m unittest discover -s tests -p test_*.py
python -m unittest discover -s tests -p test_*.py
56 changes: 31 additions & 25 deletions .github/workflows/test_bettertransformer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: BetterTransformer / Python - Test

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -16,30 +16,36 @@ jobs:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
os: [ubuntu-20.04, macos-latest]
os: [ubuntu-20.04, macos-13]
exclude: [{ python-version: 3.8, os: macos-13 }]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install .[tests]
pip install --no-cache-dir --upgrade torch torchvision torchaudio
pip install accelerate
- name: Test on pytorch stable
working-directory: tests
run: |
pytest bettertransformer/test_*.py -s -vvvvv
- name: Install dependencies 2
run: |
pip uninstall -y torch torchvision torchaudio
pip install --no-cache-dir --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
- name: Test on pytorch nightly
working-directory: tests
run: |
pytest bettertransformer/test_*.py -s -vvvvv
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
pip install .[tests]
pip install --no-cache-dir --upgrade torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install accelerate
- name: Test with stable pytorch
working-directory: tests
run: |
pytest bettertransformer -s -vvvvv
- name: Install dependencies 2
run: |
pip uninstall -y torch torchvision torchaudio
pip install --no-cache-dir --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
- name: Test with nightly pytorch
working-directory: tests
run: |
pytest bettertransformer -s -vvvvv
35 changes: 19 additions & 16 deletions .github/workflows/test_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ name: Optimum CLI / Python - Test

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -18,21 +18,24 @@ jobs:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
os: [ubuntu-20.04, macos-latest]
os: [ubuntu-20.04, macos-13]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[tests,exporters,exporters-tf]
- name: Test with unittest
working-directory: tests
run: |
python -m unittest discover -s cli -p 'test_*.py'
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
pip install --upgrade pip
pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install .[tests,exporters,exporters-tf]
- name: Test with pytest
run: |
pytest tests/cli -s -vvvv --durations=0
37 changes: 0 additions & 37 deletions .github/workflows/test_dummy_inputs.yml

This file was deleted.

Loading

0 comments on commit 78c4287

Please sign in to comment.