From 234e4face28428c6f2331e5fef51332302eab73e Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Mon, 23 Jun 2025 13:49:50 -0400 Subject: [PATCH] ci: Use python 3.12 by default Signed-off-by: Ihar Hrachyshka --- .github/workflows/e2e-nvidia-l4-x1.yml | 4 ++-- .github/workflows/e2e-nvidia-l40s-x4.yml | 4 ++-- .github/workflows/functional-gpu-nvidia-t4-x1.yml | 10 +++++----- .github/workflows/lint.yml | 4 ++-- .github/workflows/test.yml | 6 +----- docs/ci.md | 4 ++-- pyproject.toml | 2 +- tox.ini | 8 ++++++-- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/e2e-nvidia-l4-x1.yml b/.github/workflows/e2e-nvidia-l4-x1.yml index e318b18e..c6240536 100644 --- a/.github/workflows/e2e-nvidia-l4-x1.yml +++ b/.github/workflows/e2e-nvidia-l4-x1.yml @@ -116,7 +116,7 @@ jobs: run: | cat /etc/os-release mkdir -p /home/tmp - sudo dnf install -y gcc gcc-c++ make git-core python3.11 python3.11-devel util-linux + sudo dnf install -y gcc gcc-c++ make git-core python3.12 python3.12-devel util-linux - name: Set XFS retries for root disk run: | @@ -158,7 +158,7 @@ jobs: - name: Install ilab working-directory: ./instructlab run: | - PYTHON=python3.11 ./scripts/install-ilab-with-cuda.sh + PYTHON=python3.12 ./scripts/install-ilab-with-cuda.sh - name: Update instructlab-sdg library working-directory: ./sdg diff --git a/.github/workflows/e2e-nvidia-l40s-x4.yml b/.github/workflows/e2e-nvidia-l40s-x4.yml index 2702f7bc..1087d74e 100644 --- a/.github/workflows/e2e-nvidia-l40s-x4.yml +++ b/.github/workflows/e2e-nvidia-l40s-x4.yml @@ -92,7 +92,7 @@ jobs: run: | cat /etc/os-release mkdir -p /home/tmp - sudo dnf install -y gcc gcc-c++ make git-core python3.11 python3.11-devel + sudo dnf install -y gcc gcc-c++ make git-core python3.12 python3.12-devel - name: Checkout instructlab/instructlab uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -174,7 +174,7 @@ jobs: - name: Install ilab working-directory: ./instructlab run: | - PYTHON="python3.11" ./scripts/install-ilab-with-cuda.sh + PYTHON="python3.12" ./scripts/install-ilab-with-cuda.sh - name: Update instructlab-sdg library working-directory: ./sdg diff --git a/.github/workflows/functional-gpu-nvidia-t4-x1.yml b/.github/workflows/functional-gpu-nvidia-t4-x1.yml index c47eb131..0a8d1bcb 100644 --- a/.github/workflows/functional-gpu-nvidia-t4-x1.yml +++ b/.github/workflows/functional-gpu-nvidia-t4-x1.yml @@ -115,7 +115,7 @@ jobs: - name: Install Packages run: | cat /etc/os-release - sudo dnf install -y gcc gcc-c++ make git python3.11 python3.11-devel + sudo dnf install -y gcc gcc-c++ make git python3.12 python3.12-devel - name: Checkout instructlab/sdg uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -133,13 +133,13 @@ jobs: - name: Install instructlab/sdg run: | export PATH="/home/ec2-user/.local/bin:/usr/local/cuda/bin:$PATH" - python3.11 -m venv --upgrade-deps venv + python3.12 -m venv --upgrade-deps venv . venv/bin/activate nvidia-smi - python3.11 -m pip install tox tox-gh>=1.2 -c constraints-dev.txt - python3.11 -m pip cache remove llama_cpp_python + python3.12 -m pip install tox tox-gh>=1.2 -c constraints-dev.txt + python3.12 -m pip cache remove llama_cpp_python - CMAKE_ARGS="-DLLAMA_CUDA=on" python3.11 -m pip install -r requirements-dev.txt -c constraints-dev.txt + CMAKE_ARGS="-DLLAMA_CUDA=on" python3.12 -m pip install -r requirements-dev.txt -c constraints-dev.txt - name: Check disk before tests run: | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 307efbfb..128dea82 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -70,10 +70,10 @@ jobs: # https://github.com/actions/checkout/issues/249 fetch-depth: 0 - - name: Setup Python 3.11 + - name: Setup Python 3.12 uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: - python-version: 3.11 + python-version: 3.12 cache: pip cache-dependency-path: | **/pyproject.toml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index db57c675..275f7151 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -49,11 +49,7 @@ jobs: - "3.12" platform: - "ubuntu-latest" - include: - - python: "3.11" - platform: "macos-latest" - - python: "3.12" - platform: "macos-latest" + - "macos-latest" steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 diff --git a/docs/ci.md b/docs/ci.md index a8ce7c66..c2e6c8e6 100644 --- a/docs/ci.md +++ b/docs/ci.md @@ -21,9 +21,9 @@ All functional tests currently live in the `tests/functional` directory and are We have two types of functional tests - non-GPU and GPU. To run the non-GPU functional tests, you can run `tox -e functional`. To run the GPU functional tests, you can run `tox -e functional-gpu`. -In CI, the non-GPU tests are run with Python 3.10 - 3.12 on Ubuntu and MacOS runners - you can see the details [here](https://github.com/instructlab/sdg/blob/main/.github/workflows/test.yml) +In CI, the non-GPU tests are run on Ubuntu and MacOS runners - you can see the details [here](https://github.com/instructlab/sdg/blob/main/.github/workflows/test.yml) -The GPU tests are run with Python 3.11 on CentOS runners with access to a single NVIDIA Tesla T4 GPU with 16GB of vRAM - you can see the details [here](https://github.com/instructlab/sdg/blob/main/.github/workflows/functional-gpu-nvidia-t4-x1.yml) +The GPU tests are run on CentOS runners with access to a single NVIDIA Tesla T4 GPU with 16GB of vRAM - you can see the details [here](https://github.com/instructlab/sdg/blob/main/.github/workflows/functional-gpu-nvidia-t4-x1.yml) ## End-to-end (E2E) tests diff --git a/pyproject.toml b/pyproject.toml index a98fd282..bf455622 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -90,7 +90,7 @@ from-first = true known-local-folder = ["tuning"] [tool.mypy] -python_version = "3.11" +python_version = "3.12" disable_error_code = ["import-not-found", "import-untyped"] exclude = [ "^src/instructlab/sdg/generate_data\\.py$", diff --git a/tox.ini b/tox.ini index f7bcfb12..3a5b41dd 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ [tox] # py3-unit runs unit tests with 'python3' -# py311-unit runs the same tests with 'python3.11' +# py312-unit runs the same tests with 'python3.12' envlist = ruff, lint, mypy, spellcheck, py3-{unit, functional} minversion = 4.4 @@ -106,5 +106,9 @@ allowlist_externals = * [gh] python = - 3.12 = py312-{unitcov, functional} 3.11 = py311-{unitcov, functional} + 3.12 = py312-{unitcov, functional} + 3.13 = py313-{unitcov, functional} + 3.14 = py314-{unitcov, functional} + 3.15 = py315-{unitcov, functional} + 3.16 = py316-{unitcov, functional}