Skip to content

Commit

Permalink
Merge branch 'deprecate-use_auth_token' of https://github.com/hugging…
Browse files Browse the repository at this point in the history
…face/optimum into deprecate-use_auth_token
  • Loading branch information
IlyasMoutawwakil committed Jun 25, 2024
2 parents aea1601 + 3ebf83c commit febcf1a
Show file tree
Hide file tree
Showing 60 changed files with 1,012 additions and 909 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build_main_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ jobs:
- 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 @@ -138,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 @@ -160,7 +161,7 @@ jobs:
sudo docker system prune -a -f
cd optimum-tpu
pip install -U pip
pip install .
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 ..
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_pr_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
sudo docker system prune -a -f
cd optimum-tpu
pip install -U pip
pip install .
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 ..
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.

35 changes: 19 additions & 16 deletions .github/workflows/test_fx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: FX / 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,20 +16,23 @@ 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: |
pip install .[tests]
pip install git+https://github.com/huggingface/transformers.git
- name: Test with unittest
working-directory: tests
run: |
python -m pytest fx/optimization/test_transformations.py --exitfirst
- 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]
- name: Test with pytest
working-directory: tests
run: |
python -m pytest -s -v -x fx/optimization
2 changes: 1 addition & 1 deletion .github/workflows/test_onnx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ 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:
Expand Down
Loading

0 comments on commit febcf1a

Please sign in to comment.