Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Python 3.12 #304

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/e2e-nvidia-a10g-x4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,27 +114,27 @@ 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: Install ilab
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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
git clone https://github.com/instructlab/instructlab
cd instructlab
sed 's/\[.*\]//' requirements.txt > constraints.txt
python3.11 -m pip cache remove llama_cpp_python
CMAKE_ARGS="-DLLAMA_CUBLAS=on" python3.11 -m pip install --force-reinstall --no-binary llama_cpp_python -c constraints.txt llama_cpp_python
python3.11 -m pip install bitsandbytes
python3.11 -m pip install .
python3.12 -m pip cache remove llama_cpp_python
CMAKE_ARGS="-DLLAMA_CUBLAS=on" python3.12 -m pip install --force-reinstall --no-binary llama_cpp_python -c constraints.txt llama_cpp_python
python3.12 -m pip install bitsandbytes
python3.12 -m pip install .

- name: Install sdg
run: |
. venv/bin/activate
python3.11 -m pip install .
python3.12 -m pip install .

- name: Run e2e test
env:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/e2e-nvidia-t4-x1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,23 +115,23 @@ jobs:
- name: Install system 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: Install instructlab
working-directory: ./instructlab
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 cache remove llama_cpp_python
python3.12 -m pip cache remove llama_cpp_python

CMAKE_ARGS="-DLLAMA_CUDA=on" python3.11 -m pip install .
CMAKE_ARGS="-DLLAMA_CUDA=on" python3.12 -m pip install .

# https://github.com/instructlab/instructlab/issues/1821
# install with Torch and build dependencies installed
python3.11 -m pip install packaging wheel setuptools-scm
python3.11 -m pip install .[cuda]
python3.12 -m pip install packaging wheel setuptools-scm
python3.12 -m pip install .[cuda]

- name: Update instructlab-sdg library
working-directory: ./sdg
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,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@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: 3.11
python-version: 3.12
cache: pip
cache-dependency-path: |
**/pyproject.toml
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,14 @@ jobs:
python:
- "3.10"
- "3.11"
- "3.12"
platform:
- "ubuntu-latest"
include:
- python: "3.11"
platform: "macos-latest"
- python: "3.12"
platform: "macos-latest"
steps:
- name: "Harden Runner"
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
minversion = 4.4

Expand Down Expand Up @@ -82,5 +82,6 @@ commands =

[gh]
python =
3.12 = py312-unitcov
3.11 = py311-unitcov
3.10 = py310-unitcov
Loading