From d650ce9c1f3fa5ef5a51397ac6e9fa47d6325d05 Mon Sep 17 00:00:00 2001 From: Dushyant Behl Date: Fri, 24 Jan 2025 16:06:51 +0530 Subject: [PATCH 1/3] Bump python version Signed-off-by: Dushyant Behl --- .github/workflows/build-and-publish.yaml | 4 ++-- .github/workflows/coverage.yaml | 4 ++-- .github/workflows/format.yml | 4 ++-- .github/workflows/test.yaml | 8 ++------ build/Dockerfile | 6 +++--- pyproject.toml | 7 ++----- 6 files changed, 13 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-and-publish.yaml b/.github/workflows/build-and-publish.yaml index 7bb377df8..208f6b208 100644 --- a/.github/workflows/build-and-publish.yaml +++ b/.github/workflows/build-and-publish.yaml @@ -24,8 +24,8 @@ jobs: strategy: matrix: python-version: - - setup: "3.11" - tox: "py311" + - setup: "3.12" + tox: "py312" environment: name: pypi diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index e5a7a0eb4..75415a749 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -10,10 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up Python 3.11 + - name: Set up Python 3.12 uses: actions/setup-python@v4 with: - python-version: 3.11 + python-version: 3.12 - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 6e26a490f..777a3853b 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -25,10 +25,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up Python 3.9 + - name: Set up Python 3.12 uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.12 - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ead02bb31..7f449d774 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -11,12 +11,8 @@ jobs: strategy: matrix: python-version: - - setup: "3.9" - tox: "py39" - - setup: "3.10" - tox: "py310" - - setup: "3.11" - tox: "py311" + - setup: "3.12" + tox: "py312" steps: - uses: actions/checkout@v4 - name: Install dependencies diff --git a/build/Dockerfile b/build/Dockerfile index 9a6a5583f..f09078ce7 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -17,7 +17,7 @@ ARG BASE_UBI_IMAGE_TAG=latest ARG USER=tuning ARG USER_UID=1000 -ARG PYTHON_VERSION=3.11 +ARG PYTHON_VERSION=3.12 ARG WHEEL_VERSION="" ## Enable Aimstack or MLflow if requested via ENABLE_AIM/MLFLOW set to "true" ARG ENABLE_AIM=false @@ -31,7 +31,7 @@ ARG PYTHON_VERSION ARG USER ARG USER_UID -# Note this works for 3.9, 3.11, 3.12 +# Note this is tested to be working for version 3.12 RUN dnf remove -y --disableplugin=subscription-manager \ subscription-manager \ && dnf install -y python${PYTHON_VERSION} procps g++ python${PYTHON_VERSION}-devel \ @@ -51,7 +51,7 @@ RUN useradd -u $USER_UID ${USER} -m -g 0 --system && \ ## Used as base of the Release stage to removed unrelated the packages and CVEs FROM base AS release-base -# Removes the python3.9 code to eliminate possible CVEs. Also removes dnf +# Removes the python code to eliminate possible CVEs. Also removes dnf RUN rpm -e $(dnf repoquery python3-* -q --installed) dnf python3 yum crypto-policies-scripts diff --git a/pyproject.toml b/pyproject.toml index b930f7680..36c6a6f85 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,15 +15,12 @@ authors = [ ] license = {text = "Apache-2.0"} readme = "README.md" -requires-python = "~=3.9" +requires-python = ">=3.12" keywords = ['fms-hf-tuning', 'python', 'tuning'] classifiers=[ "License :: OSI Approved :: Apache Software License", "Development Status :: 4 - Beta", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12" ] dependencies = [ "numpy>=1.26.4,<2.0", From 2052af7c0a5d7e5e0f200c8487c701e84eb13888 Mon Sep 17 00:00:00 2001 From: Anh Uong Date: Mon, 27 Jan 2025 12:35:45 -0700 Subject: [PATCH 2/3] retain support for python 3.9-3.12 Signed-off-by: Anh Uong --- .github/workflows/test.yaml | 6 ++++++ build/Dockerfile | 2 +- pyproject.toml | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7f449d774..e56be6f37 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -11,6 +11,12 @@ jobs: strategy: matrix: python-version: + - setup: "3.9" + tox: "py39" + - setup: "3.10" + tox: "py310" + - setup: "3.11" + tox: "py311" - setup: "3.12" tox: "py312" steps: diff --git a/build/Dockerfile b/build/Dockerfile index 51ea63804..c8aaab5fc 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -32,7 +32,7 @@ ARG PYTHON_VERSION ARG USER ARG USER_UID -# Note this is tested to be working for version 3.12 +# Note this is tested to be working for version 3.9, 3.11, 3.12 RUN dnf remove -y --disableplugin=subscription-manager \ subscription-manager \ && dnf install -y python${PYTHON_VERSION} procps g++ python${PYTHON_VERSION}-devel \ diff --git a/pyproject.toml b/pyproject.toml index c6cfa6fa3..515d93e5d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,10 @@ keywords = ['fms-hf-tuning', 'python', 'tuning'] classifiers=[ "License :: OSI Approved :: Apache Software License", "Development Status :: 4 - Beta", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12" ] dependencies = [ From 6d3d44d348964d62903c5596dbbac6d3f1c6a2fe Mon Sep 17 00:00:00 2001 From: Anh Uong Date: Mon, 27 Jan 2025 12:40:42 -0700 Subject: [PATCH 3/3] Update required python version Co-authored-by: Will Johnson Signed-off-by: Anh Uong --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 515d93e5d..eb1da2993 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ authors = [ ] license = {text = "Apache-2.0"} readme = "README.md" -requires-python = ">=3.12" +requires-python = "~=3.9" keywords = ['fms-hf-tuning', 'python', 'tuning'] classifiers=[ "License :: OSI Approved :: Apache Software License",