Skip to content

Commit

Permalink
[Build] Drop Python 3.8 (#873)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
riedgar-ms authored Jun 2, 2024
1 parent 15ff21d commit e234c56
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/notebook_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
36 changes: 28 additions & 8 deletions .github/workflows/workflow-pr-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand All @@ -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
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e234c56

Please sign in to comment.