From 23534e3d9b781e2508e79b6bd92fb164a03d82b0 Mon Sep 17 00:00:00 2001 From: Ella Charlaix <80481427+echarlaix@users.noreply.github.com> Date: Tue, 5 Nov 2024 16:28:20 +0100 Subject: [PATCH] Revert "Drop python 3.8 (#2086)" This reverts commit 35eebfe62bf721bbab365f569bd0c73057239732. --- .github/workflows/dev_test_benckmark.yml | 8 ++++++-- .github/workflows/dev_test_bettertransformer.yml | 6 ++++-- .github/workflows/dev_test_dummy_inputs.yml | 4 +++- .github/workflows/dev_test_exporters.yml | 8 ++++++-- .github/workflows/dev_test_fx.yml | 4 +++- .github/workflows/dev_test_onnx.yml | 4 +++- .github/workflows/dev_test_onnxruntime.yml | 4 +++- .github/workflows/dev_test_optimum_common.yml | 5 ++++- .github/workflows/test_export_onnx.yml | 2 +- .github/workflows/test_export_tflite.yml | 5 +++-- .github/workflows/test_export_tflite_cli.yml | 5 +++-- .../test_export_tflite_cli_dynamic_quantization_int8.yml | 5 +++-- .../test_export_tflite_cli_quantization_fp16.yml | 5 +++-- .../test_export_tflite_cli_quantization_full_int8.yml | 5 +++-- ...export_tflite_cli_quantization_int8_custom_dataset.yml | 5 +++-- ...xport_tflite_cli_quantization_int8_default_dataset.yml | 5 +++-- .../test_export_tflite_cli_quantization_int8x16.yml | 5 +++-- .github/workflows/test_exporters_common.yml | 5 +++-- .github/workflows/test_exporters_slow.yml | 5 +++-- .github/workflows/test_fx.yml | 2 +- .github/workflows/test_offline.yml | 5 +++-- .github/workflows/test_onnx.yml | 2 +- .github/workflows/test_onnxruntime.yml | 2 +- .github/workflows/test_onnxruntime_slow.yml | 2 +- .github/workflows/test_optimum_common.yml | 4 ++-- .github/workflows/test_utils.yml | 2 +- setup.py | 7 +++---- 27 files changed, 76 insertions(+), 45 deletions(-) diff --git a/.github/workflows/dev_test_benckmark.yml b/.github/workflows/dev_test_benckmark.yml index a898d288625..5f6fc825021 100644 --- a/.github/workflows/dev_test_benckmark.yml +++ b/.github/workflows/dev_test_benckmark.yml @@ -12,8 +12,12 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9', '3.11'] - runs-on: ubuntu-20.04 + python-version: + - 3.8 + - 3.9 + os: + - ubuntu-20.04 + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - name: Setup Python ${{ matrix.python-version }} diff --git a/.github/workflows/dev_test_bettertransformer.yml b/.github/workflows/dev_test_bettertransformer.yml index e75b5e3bf98..e4c999ca6da 100644 --- a/.github/workflows/dev_test_bettertransformer.yml +++ b/.github/workflows/dev_test_bettertransformer.yml @@ -12,16 +12,18 @@ jobs: strategy: fail-fast: false matrix: + python-version: + - 3.8 os: - ubuntu-20.04 - macos-13 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - - name: Setup Python + - name: Setup Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: - python-version: '3.9' + python-version: ${{ matrix.python-version }} - name: Install dependencies run: | pip install .[tests] diff --git a/.github/workflows/dev_test_dummy_inputs.yml b/.github/workflows/dev_test_dummy_inputs.yml index 72a4763e432..49baa49c418 100644 --- a/.github/workflows/dev_test_dummy_inputs.yml +++ b/.github/workflows/dev_test_dummy_inputs.yml @@ -12,7 +12,9 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9', '3.11'] + python-version: + - 3.8 + - 3.9 os: - ubuntu-20.04 - macos-13 diff --git a/.github/workflows/dev_test_exporters.yml b/.github/workflows/dev_test_exporters.yml index b2dee3ed3a9..5d967d125f5 100644 --- a/.github/workflows/dev_test_exporters.yml +++ b/.github/workflows/dev_test_exporters.yml @@ -12,8 +12,12 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9', '3.11'] - runs-on: ubuntu-20.04 + python-version: + - 3.8 + - 3.9 + os: + - ubuntu-20.04 + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - name: Setup Python ${{ matrix.python-version }} diff --git a/.github/workflows/dev_test_fx.yml b/.github/workflows/dev_test_fx.yml index a0c54c78365..0b8633282f7 100644 --- a/.github/workflows/dev_test_fx.yml +++ b/.github/workflows/dev_test_fx.yml @@ -12,7 +12,9 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9', '3.11'] + python-version: + - 3.8 + - 3.9 os: - ubuntu-20.04 - macos-13 diff --git a/.github/workflows/dev_test_onnx.yml b/.github/workflows/dev_test_onnx.yml index f7514e1c5e5..48052cfded3 100644 --- a/.github/workflows/dev_test_onnx.yml +++ b/.github/workflows/dev_test_onnx.yml @@ -12,7 +12,9 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9', '3.11'] + python-version: + - 3.8 + - 3.9 os: - ubuntu-20.04 - macos-13 diff --git a/.github/workflows/dev_test_onnxruntime.yml b/.github/workflows/dev_test_onnxruntime.yml index c9104ebbd6c..857028ab2db 100644 --- a/.github/workflows/dev_test_onnxruntime.yml +++ b/.github/workflows/dev_test_onnxruntime.yml @@ -12,7 +12,9 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9', '3.11'] + python-version: + - 3.8 + - 3.9 os: - ubuntu-20.04 - windows-2019 diff --git a/.github/workflows/dev_test_optimum_common.yml b/.github/workflows/dev_test_optimum_common.yml index 117db50437b..807ed0b1dab 100644 --- a/.github/workflows/dev_test_optimum_common.yml +++ b/.github/workflows/dev_test_optimum_common.yml @@ -12,7 +12,10 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9', '3.11'] + python-version: + - 3.7 + - 3.8 + - 3.9 os: - ubuntu-20.04 - windows-2019 diff --git a/.github/workflows/test_export_onnx.yml b/.github/workflows/test_export_onnx.yml index d1fd4a9723f..0cd19a1724c 100644 --- a/.github/workflows/test_export_onnx.yml +++ b/.github/workflows/test_export_onnx.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9'] + python-version: [3.9] os: [ubuntu-20.04] runs-on: ${{ matrix.os }} diff --git a/.github/workflows/test_export_tflite.yml b/.github/workflows/test_export_tflite.yml index 225a28c1cba..362390b166d 100644 --- a/.github/workflows/test_export_tflite.yml +++ b/.github/workflows/test_export_tflite.yml @@ -20,9 +20,10 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9', '3.11'] + python-version: [3.8, 3.9] + os: [ubuntu-20.04] - runs-on: ubuntu-20.04 + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - name: Setup Python ${{ matrix.python-version }} diff --git a/.github/workflows/test_export_tflite_cli.yml b/.github/workflows/test_export_tflite_cli.yml index cfca58cf9c1..e14e4cde325 100644 --- a/.github/workflows/test_export_tflite_cli.yml +++ b/.github/workflows/test_export_tflite_cli.yml @@ -20,9 +20,10 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9', '3.11'] + python-version: [3.8, 3.9] + os: [ubuntu-20.04] - runs-on: ubuntu-20.04 + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - name: Setup Python ${{ matrix.python-version }} diff --git a/.github/workflows/test_export_tflite_cli_dynamic_quantization_int8.yml b/.github/workflows/test_export_tflite_cli_dynamic_quantization_int8.yml index 9cebe8ac0f6..7e4a83b3b7b 100644 --- a/.github/workflows/test_export_tflite_cli_dynamic_quantization_int8.yml +++ b/.github/workflows/test_export_tflite_cli_dynamic_quantization_int8.yml @@ -20,9 +20,10 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9'] + python-version: [3.8, 3.9] + os: [ubuntu-20.04] - runs-on: ubuntu-20.04 + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - name: Setup Python ${{ matrix.python-version }} diff --git a/.github/workflows/test_export_tflite_cli_quantization_fp16.yml b/.github/workflows/test_export_tflite_cli_quantization_fp16.yml index ca35ad8b3eb..981dd005e52 100644 --- a/.github/workflows/test_export_tflite_cli_quantization_fp16.yml +++ b/.github/workflows/test_export_tflite_cli_quantization_fp16.yml @@ -20,9 +20,10 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9'] + python-version: [3.8, 3.9] + os: [ubuntu-20.04] - runs-on: ubuntu-20.04 + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - name: Setup Python ${{ matrix.python-version }} diff --git a/.github/workflows/test_export_tflite_cli_quantization_full_int8.yml b/.github/workflows/test_export_tflite_cli_quantization_full_int8.yml index 1531ffa5c9c..9064bfaf315 100644 --- a/.github/workflows/test_export_tflite_cli_quantization_full_int8.yml +++ b/.github/workflows/test_export_tflite_cli_quantization_full_int8.yml @@ -20,9 +20,10 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9'] + python-version: [3.8, 3.9] + os: [ubuntu-20.04] - runs-on: ubuntu-20.04 + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - name: Setup Python ${{ matrix.python-version }} diff --git a/.github/workflows/test_export_tflite_cli_quantization_int8_custom_dataset.yml b/.github/workflows/test_export_tflite_cli_quantization_int8_custom_dataset.yml index 7274d09c0f8..824e8933a08 100644 --- a/.github/workflows/test_export_tflite_cli_quantization_int8_custom_dataset.yml +++ b/.github/workflows/test_export_tflite_cli_quantization_int8_custom_dataset.yml @@ -20,9 +20,10 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9'] + python-version: [3.8, 3.9] + os: [ubuntu-20.04] - runs-on: ubuntu-20.04 + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - name: Setup Python ${{ matrix.python-version }} diff --git a/.github/workflows/test_export_tflite_cli_quantization_int8_default_dataset.yml b/.github/workflows/test_export_tflite_cli_quantization_int8_default_dataset.yml index 6c8639ebfe0..e975997e379 100644 --- a/.github/workflows/test_export_tflite_cli_quantization_int8_default_dataset.yml +++ b/.github/workflows/test_export_tflite_cli_quantization_int8_default_dataset.yml @@ -20,9 +20,10 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9'] + python-version: [3.8, 3.9] + os: [ubuntu-20.04] - runs-on: ubuntu-20.04 + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - name: Setup Python ${{ matrix.python-version }} diff --git a/.github/workflows/test_export_tflite_cli_quantization_int8x16.yml b/.github/workflows/test_export_tflite_cli_quantization_int8x16.yml index 39902d0dd50..ef59cff0b92 100644 --- a/.github/workflows/test_export_tflite_cli_quantization_int8x16.yml +++ b/.github/workflows/test_export_tflite_cli_quantization_int8x16.yml @@ -20,9 +20,10 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9'] + python-version: [3.8, 3.9] + os: [ubuntu-20.04] - runs-on: ubuntu-20.04 + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - name: Setup Python ${{ matrix.python-version }} diff --git a/.github/workflows/test_exporters_common.yml b/.github/workflows/test_exporters_common.yml index 801e0bebc55..11f6038afe4 100644 --- a/.github/workflows/test_exporters_common.yml +++ b/.github/workflows/test_exporters_common.yml @@ -15,9 +15,10 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9', '3.11'] + python-version: [3.9] + os: [ubuntu-20.04] - runs-on: ubuntu-20.04 + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - name: Setup Python ${{ matrix.python-version }} diff --git a/.github/workflows/test_exporters_slow.yml b/.github/workflows/test_exporters_slow.yml index b5f142fc7dc..453389d63fa 100644 --- a/.github/workflows/test_exporters_slow.yml +++ b/.github/workflows/test_exporters_slow.yml @@ -14,9 +14,10 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9'] + python-version: [3.9] + os: [ubuntu-20.04] - runs-on: ubuntu-20.04 + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - name: Setup Python ${{ matrix.python-version }} diff --git a/.github/workflows/test_fx.yml b/.github/workflows/test_fx.yml index 0a1890cc715..a4e6dd3cd29 100644 --- a/.github/workflows/test_fx.yml +++ b/.github/workflows/test_fx.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9'] + python-version: [3.9] os: [ubuntu-20.04, macos-13] runs-on: ${{ matrix.os }} diff --git a/.github/workflows/test_offline.yml b/.github/workflows/test_offline.yml index 29b7b183bd7..20911fe6db8 100644 --- a/.github/workflows/test_offline.yml +++ b/.github/workflows/test_offline.yml @@ -15,9 +15,10 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9'] + python-version: [3.9] + os: [ubuntu-20.04] - runs-on: ubuntu-20.04 + runs-on: ${{ matrix.os }} steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/.github/workflows/test_onnx.yml b/.github/workflows/test_onnx.yml index 418a9e42c1a..dd1f3bee63d 100644 --- a/.github/workflows/test_onnx.yml +++ b/.github/workflows/test_onnx.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9'] + python-version: [3.9] os: [ubuntu-20.04, macos-14] runs-on: ${{ matrix.os }} diff --git a/.github/workflows/test_onnxruntime.yml b/.github/workflows/test_onnxruntime.yml index 089300f7cd9..0ab95752d01 100644 --- a/.github/workflows/test_onnxruntime.yml +++ b/.github/workflows/test_onnxruntime.yml @@ -39,7 +39,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: 3.9 - name: Install dependencies run: | diff --git a/.github/workflows/test_onnxruntime_slow.yml b/.github/workflows/test_onnxruntime_slow.yml index 89d44e57ad1..c5679e5b307 100644 --- a/.github/workflows/test_onnxruntime_slow.yml +++ b/.github/workflows/test_onnxruntime_slow.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9'] + python-version: [3.9] os: [ubuntu-20.04] runs-on: ${{ matrix.os }} diff --git a/.github/workflows/test_optimum_common.yml b/.github/workflows/test_optimum_common.yml index 9aab45e4b71..5ad42807a5f 100644 --- a/.github/workflows/test_optimum_common.yml +++ b/.github/workflows/test_optimum_common.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9'] + python-version: [3.9] os: [ubuntu-20.04, windows-2019, macos-13] runs-on: ${{ matrix.os }} @@ -36,5 +36,5 @@ jobs: 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.9' && matrix.os == 'ubuntu-20.04' }} + export HUGGINGFACE_CO_STAGING=${{ matrix.python-version == '3.8' && matrix.os == 'ubuntu-20.04' }} pytest tests/test_*.py diff --git a/.github/workflows/test_utils.yml b/.github/workflows/test_utils.yml index 0126b023c60..b5f2e27fc6a 100644 --- a/.github/workflows/test_utils.yml +++ b/.github/workflows/test_utils.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-20.04, macos-13] - python-version: ['3.9'] + python-version: [3.9] runs-on: ${{ matrix.os }} steps: diff --git a/setup.py b/setup.py index 7ea0da56c29..82892bfcc8c 100644 --- a/setup.py +++ b/setup.py @@ -123,10 +123,9 @@ "Intended Audience :: Education", "Intended Audience :: Science/Research", "Operating System :: OS Independent", - "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", "Topic :: Scientific/Engineering :: Artificial Intelligence", ], keywords="transformers, quantization, pruning, optimization, training, inference, onnx, onnx runtime, intel, " @@ -138,7 +137,7 @@ packages=find_namespace_packages(include=["optimum*"]), install_requires=REQUIRED_PKGS, extras_require=EXTRAS_REQUIRE, - python_requires=">=3.9.0", + python_requires=">=3.7.0", include_package_data=True, zip_safe=False, entry_points={"console_scripts": ["optimum-cli=optimum.commands.optimum_cli:main"]},