From e234c565b61ffb90dbbf81cd937a00505ef79649 Mon Sep 17 00:00:00 2001 From: Richard Edgar Date: Sun, 2 Jun 2024 13:04:02 -0400 Subject: [PATCH] [Build] Drop Python 3.8 (#873) Python 3.8 is approaching EoL, and is starting to lose support from our dependencies. Bump our minimum supported version to Python 3.9. This allows us to include MacOS-ARM in the builds --- .github/workflows/ci_tests.yml | 2 +- .github/workflows/notebook_tests.yml | 2 +- .github/workflows/workflow-pr-gate.yml | 36 ++++++++++++++++++++------ pyproject.toml | 2 +- setup.py | 2 +- 5 files changed, 32 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 43c1a32b9..3205d1761 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false # Don't cancel all on first failure matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/notebook_tests.yml b/.github/workflows/notebook_tests.yml index 778816fd0..5b6c7bc31 100644 --- a/.github/workflows/notebook_tests.yml +++ b/.github/workflows/notebook_tests.yml @@ -23,7 +23,7 @@ jobs: strategy: fail-fast: false # Don't cancel all on first failure matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/workflow-pr-gate.yml b/.github/workflows/workflow-pr-gate.yml index be2952fb2..f2bac5be6 100644 --- a/.github/workflows/workflow-pr-gate.yml +++ b/.github/workflows/workflow-pr-gate.yml @@ -28,7 +28,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.9 - name: Install dependencies run: | python -m pip install --upgrade pip @@ -41,7 +41,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-12] - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12"] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -102,7 +102,7 @@ jobs: strategy: fail-fast: false # Don't cancel all on first failure matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11"] model: - "gpt2cpu" - "phi2cpu" @@ -123,7 +123,7 @@ jobs: fail-fast: false # Don't cancel all on first failure matrix: # Need to figure out what happened to 3.12 - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11"] uses: ./.github/workflows/action_server_tests.yml with: os: ubuntu-latest @@ -144,12 +144,12 @@ jobs: # Third Stage ============================================================== # Windows and MacOS, plus other GPU Linux tests - unit-tests-mac: + unit-tests-mac-x86: needs: end-stage-2 strategy: fail-fast: false # Don't cancel all on first failure matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12"] model: - "gpt2cpu" - "phi2cpu" @@ -164,12 +164,32 @@ jobs: python-version: ${{ matrix.python-version }} model: ${{ matrix.model }} + unit-tests-mac-arm: + needs: end-stage-2 + strategy: + fail-fast: false # Don't cancel all on first failure + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12"] + model: + - "gpt2cpu" + # - "phi2cpu" Seems to get stuck + # - "transformers_mistral_7b" See Issue 713 + - "hfllama7b" + - "hfllama_mistral_7b" + # - "transformers_phi3cpu_mini_4k_instruct" Gives trouble on MacOS + - "hfllama_phi3cpu_mini_4k_instruct" + uses: ./.github/workflows/action_plain_unit_tests.yml + with: + os: macos-latest + python-version: ${{ matrix.python-version }} + model: ${{ matrix.model }} + unit-tests-win: needs: end-stage-2 strategy: fail-fast: false # Don't cancel all on first failure matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12"] model: - "gpt2cpu" - "phi2cpu" @@ -189,7 +209,7 @@ jobs: strategy: fail-fast: false # Don't cancel all on first failure matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11"] uses: ./.github/workflows/action_gpu_unit_tests.yml with: os: gpu-runner diff --git a/pyproject.toml b/pyproject.toml index 555123934..dc957a259 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ markers = [ [tool.black] line-length = 88 -target_version = ['py38', 'py39', 'py310', 'py311', 'py312'] +target_version = ['py39', 'py310', 'py311', 'py312'] [tool.isort] profile = "black" diff --git a/setup.py b/setup.py index 19cec3a39..a5697e7e8 100644 --- a/setup.py +++ b/setup.py @@ -111,7 +111,7 @@ def find_version(*file_paths): ) ], cmdclass={"build_ext": build_ext}, - python_requires=">=3.8", + python_requires=">=3.9", install_requires=install_requires, extras_require={ "all": all_requires,