Skip to content
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

transformers 4.46 #2078

Merged
merged 34 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
fdbd12f
transformers 4.46
echarlaix Oct 23, 2024
1583017
setup
echarlaix Oct 23, 2024
a4c3aa6
uupdate setup
echarlaix Oct 23, 2024
f0a4b7a
fix t5
IlyasMoutawwakil Oct 23, 2024
ae08d8c
update python (3.8 eol)
IlyasMoutawwakil Oct 23, 2024
0096598
fix onnx test
IlyasMoutawwakil Oct 23, 2024
9435122
fixed deberta, onnxruntime tests in series passing
IlyasMoutawwakil Oct 23, 2024
d25cd97
fix bt
IlyasMoutawwakil Oct 23, 2024
29a5dbc
fixed t5_forward for real, because it's also used by blip-2 as well
IlyasMoutawwakil Oct 23, 2024
c860ba9
fix Phi3
IlyasMoutawwakil Oct 24, 2024
6191617
fix opt
IlyasMoutawwakil Oct 24, 2024
79ed335
vision encoder decoder
IlyasMoutawwakil Oct 24, 2024
72ca53c
fix setup
IlyasMoutawwakil Oct 24, 2024
d1236dd
style
IlyasMoutawwakil Oct 24, 2024
f98a605
fix encoder decoder
IlyasMoutawwakil Oct 24, 2024
d1f4870
fixed transformers branch
IlyasMoutawwakil Oct 24, 2024
970235a
branch
IlyasMoutawwakil Oct 24, 2024
27a2934
allow 4.47
IlyasMoutawwakil Oct 24, 2024
4e9b3b5
remove patch
IlyasMoutawwakil Oct 25, 2024
5ef5c48
add opt
echarlaix Oct 25, 2024
41e6be5
add test
echarlaix Oct 25, 2024
4b16e7c
fix OPT ONNX export and inference
echarlaix Oct 28, 2024
49e911f
add test
echarlaix Oct 28, 2024
671293e
update setup
echarlaix Oct 28, 2024
a985617
style
echarlaix Oct 28, 2024
b86eaf4
merge tests
echarlaix Oct 28, 2024
6ebf667
update tes num beams
echarlaix Oct 28, 2024
1ce1a0f
add test transformers version
echarlaix Oct 28, 2024
641d351
add architectures depending on transformers
echarlaix Oct 29, 2024
d1725f7
add warning
echarlaix Oct 29, 2024
d3c3e7a
revert
echarlaix Oct 29, 2024
fac176c
update test generation length
echarlaix Oct 29, 2024
0cec49b
style
echarlaix Oct 29, 2024
f2f8f41
Merge branch 'main' into trasformers-446
echarlaix Oct 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check_code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8]
python-version: [3.9]
os: [ubuntu-20.04]

runs-on: ${{ matrix.os }}
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/test_benckmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ name: Benchmark suite / 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 @@ -17,20 +17,20 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
python-version: [3.9]
os: [ubuntu-20.04]

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 wheel
pip install .[tests,onnxruntime,benchmark]
- name: Test with unittest
run: |
python -m unittest discover --start-directory tests/benchmark --pattern 'test_*.py'
- 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 wheel
pip install .[tests,onnxruntime,benchmark]
- name: Test with unittest
run: |
python -m unittest discover --start-directory tests/benchmark --pattern 'test_*.py'
4 changes: 2 additions & 2 deletions .github/workflows/test_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
python-version: [3.9]
os: [ubuntu-20.04, macos-13]

runs-on: ${{ matrix.os }}
Expand All @@ -34,7 +34,7 @@ jobs:
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]
pip install .[tests,exporters-tf]

- name: Test with pytest
run: |
Expand Down
44 changes: 22 additions & 22 deletions .github/workflows/test_export_onnx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Exporters ONNX / 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 @@ -15,27 +15,27 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
python-version: [3.9]
os: [ubuntu-20.04]

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 for pytorch export
run: |
pip install .[tests,exporters]
- name: Test with unittest
working-directory: tests
run: |
pytest exporters/onnx/test_onnx_*.py -s -n auto -m "not tensorflow_test and not timm_test" --durations=0
- name: Install dependencies for tensorflow export
run: |
pip install .[tests,exporters-tf]
- name: Test with unittest
working-directory: tests
run: |
pytest exporters/onnx/test_onnx_*.py -n auto -m "tensorflow_test" -s --durations=0
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies for pytorch export
run: |
pip install .[tests,exporters]
- name: Test with unittest
working-directory: tests
run: |
pytest exporters/onnx/test_onnx_*.py -s -n auto -m "not tensorflow_test and not timm_test" --durations=0
- name: Install dependencies for tensorflow export
run: |
pip install .[tests,exporters-tf]
- name: Test with unittest
working-directory: tests
run: |
pytest exporters/onnx/test_onnx_*.py -n auto -m "tensorflow_test" -s --durations=0
30 changes: 15 additions & 15 deletions .github/workflows/test_export_onnx_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Exporters ONNX 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 @@ -15,20 +15,20 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
python-version: [3.9]
os: [ubuntu-20.04]

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 for pytorch export
run: |
pip install .[tests,exporters]
- name: Test with unittest
working-directory: tests
run: |
pytest exporters/onnx/test_exporters_onnx_cli.py -n auto -m "not tensorflow_test and not timm_test" -s --durations=0
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies for pytorch export
run: |
pip install .[tests,exporters]
- name: Test with unittest
working-directory: tests
run: |
pytest exporters/onnx/test_exporters_onnx_cli.py -n auto -m "not tensorflow_test and not timm_test" -s --durations=0
26 changes: 13 additions & 13 deletions .github/workflows/test_export_onnx_cli_timm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
python-version: [3.9]
os: [ubuntu-20.04]

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 for pytorch export
run: |
pip install .[tests,exporters]
- name: Test with unittest
working-directory: tests
run: |
RUN_SLOW=1 pytest exporters/onnx/test_exporters_onnx_cli.py -n auto -k "timm" -s --durations=0
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies for pytorch export
run: |
pip install .[tests,exporters]
- name: Test with unittest
working-directory: tests
run: |
RUN_SLOW=1 pytest exporters/onnx/test_exporters_onnx_cli.py -n auto -k "timm" -s --durations=0
27 changes: 13 additions & 14 deletions .github/workflows/test_export_onnx_timm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,20 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
python-version: [3.9]
os: [ubuntu-20.04]

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 for pytorch export
run: |
pip install .[tests,exporters]
- name: Test with unittest
working-directory: tests
run: |
RUN_SLOW=1 pytest exporters/onnx/ -s -n auto -k "timm" --durations=0

- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies for pytorch export
run: |
pip install .[tests,exporters]
- name: Test with unittest
working-directory: tests
run: |
RUN_SLOW=1 pytest exporters/onnx/ -s -n auto -k "timm" --durations=0
2 changes: 1 addition & 1 deletion .github/workflows/test_exporters_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
python-version: [3.9]
os: [ubuntu-20.04]

runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_exporters_slow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
python-version: [3.9]
os: [ubuntu-20.04]

runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_fx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
python-version: [3.9]
os: [ubuntu-20.04, macos-13]

runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_offline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
python-version: [3.9]
os: [ubuntu-20.04]

runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_onnx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
python-version: [3.9]
os: [ubuntu-20.04, macos-14]

runs-on: ${{ matrix.os }}
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/test_onnxruntime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
transformers-version: ["latest"]
os: [ubuntu-20.04, windows-2019, macos-13]
include:
- transformers-version: "4.45.*"
os: ubuntu-20.04

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -33,17 +36,21 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

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

- 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,onnxruntime]

- name: Install transformers ${{ matrix.transformers-version }}
if: ${{ matrix.transformers-version != 'latest' }}
run: pip install transformers==${{ matrix.transformers-version }}

- name: Test with pytest (in series)
working-directory: tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_onnxruntime_slow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
python-version: [3.9]
os: [ubuntu-20.04]

runs-on: ${{ matrix.os }}
Expand Down
39 changes: 19 additions & 20 deletions .github/workflows/test_optimum_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ name: Optimum common / 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 @@ -17,25 +17,24 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
python-version: [3.9]
os: [ubuntu-20.04, windows-2019, 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]
ls -l optimum/
- name: Test with unittest
shell: bash
run: |
# Setting HUGGINGFACE_CO_STAGING to true for only one job of the matrix as the staging tests cannot run in parallel.
export HUGGINGFACE_CO_STAGING=${{ matrix.python-version == '3.8' && matrix.os == 'ubuntu-20.04' }}
pytest tests/test_*.py

- 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]
ls -l optimum/
- name: Test with unittest
shell: bash
run: |
# Setting HUGGINGFACE_CO_STAGING to true for only one job of the matrix as the staging tests cannot run in parallel.
export HUGGINGFACE_CO_STAGING=${{ matrix.python-version == '3.8' && matrix.os == 'ubuntu-20.04' }}
pytest tests/test_*.py
Loading
Loading