Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
4978e70
feat: attempt to swtich pruna from poetry to uv
johnrachwan123 May 29, 2025
e20613a
fix: uv installation
johnrachwan123 May 29, 2025
8f2bed9
refactor: remove requirements.txt
johnrachwan123 May 30, 2025
7b69a71
format the pyproject.toml properly + point to the license file
GreatBahram May 30, 2025
8a64b05
change linting file to use uv
GreatBahram May 30, 2025
2d433a6
use latest version of checkout
GreatBahram May 30, 2025
83954fe
use latest version of setup-python
GreatBahram May 30, 2025
674bdc1
change documentation file to use uv
GreatBahram May 30, 2025
1330747
use latest version of setup-python
GreatBahram May 30, 2025
fc6cf4d
change external_tests file to use uv
GreatBahram May 30, 2025
e313f0a
change internal_tests file to use uv + prefix previous command to use uv
GreatBahram May 30, 2025
b2bf92e
change installation file to use uv
GreatBahram May 30, 2025
2285f53
change package_buil;d file to use uv + add retention policy there
GreatBahram May 30, 2025
a0de480
tests: update package build to uv
johnrachwan123 May 30, 2025
fd32348
remove poetry from gitignore
GreatBahram May 30, 2025
a80c8f2
Merge branch 'feat/switch-pruna-from-poetry-to-uv' into feat/switch-p…
GreatBahram May 30, 2025
f3d27de
format the pyproject.toml properly + point to the license file
GreatBahram May 30, 2025
37a5461
change package_buil;d file to use uv + add retention policy there
GreatBahram May 30, 2025
60a8d7a
reduce the diff
GreatBahram Jun 3, 2025
2aed34e
add alaki file (random file); hopefully to triggers most of the workf…
GreatBahram Jun 3, 2025
4f1155f
Merge branch 'main' into feat/switch-pruna-from-poetry-to-uv
GreatBahram Jun 3, 2025
c507d2d
Delete src/pruna/alaki.py
davidberenstein1957 Jun 3, 2025
17ae8af
Merge branch 'main' into feat/switch-pruna-from-poetry-to-uv
GreatBahram Jun 9, 2025
74b239e
Merge branch 'main' into feat/switch-pruna-from-poetry-to-uv
GreatBahram Jun 10, 2025
8c70b21
build: bump actions/setup-python from 3 to 5 (#193)
dependabot[bot] Jun 10, 2025
399bad7
build: bump abatilo/actions-poetry from 2 to 4 (#195)
dependabot[bot] Jun 10, 2025
4305c8d
build: bump actions/cache from 3 to 4 (#196)
dependabot[bot] Jun 10, 2025
8afe8c2
build: bump actions/checkout from 3 to 4 (#194)
dependabot[bot] Jun 10, 2025
f352f12
Merge remote-tracking branch 'upstream/main' into feat/switch-pruna-f…
GreatBahram Jun 10, 2025
e322d2b
Update pyproject.toml
davidberenstein1957 Jun 10, 2025
33cb220
build: update ctranslate2 requirement from ==4.5.0 to ==4.6.0 (#199)
dependabot[bot] Jun 10, 2025
96b7817
Merge remote-tracking branch 'upstream/main' into feat/switch-pruna-f…
GreatBahram Jun 10, 2025
e5fe992
Merge remote-tracking branch 'upstream/feat/switch-pruna-from-poetry-…
GreatBahram Jun 10, 2025
a76021d
this is gone on main
GreatBahram Jun 10, 2025
d72896e
enable caching in order to expedite the installtion time
GreatBahram Jun 10, 2025
1245fcd
just a test
GreatBahram Jun 11, 2025
dceb159
Remove commented-out step for deleting .so files from linting workflow
GreatBahram Jun 11, 2025
993071c
Merge branch 'feat/switch-pruna-from-poetry-to-uv' into feat/switch-p…
johnrachwan123 Jun 11, 2025
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
26 changes: 8 additions & 18 deletions .github/workflows/cpu_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,22 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: abatilo/actions-poetry@v2

- name: Update Poetry lock file
run: poetry lock

- name: Cache Poetry virtualenv
uses: actions/cache@v3
- uses: astral-sh/setup-uv@v6
with:
path: ~/.cache/pypoetry/virtualenvs
key: poetry-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
poetry-${{ runner.os }}-${{ matrix.python-version }}

- name: Install dependencies using Poetry
run: poetry install --extras tests
enable-cache: true
- name: Install dependencies
run: |
uv sync --extra tests

- name: Run tests
run: |
poetry run pytest -m "cpu and not slow and not high_cpu"
uv run pytest -m "cpu and not slow and not high_cpu"


20 changes: 8 additions & 12 deletions .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,28 @@ jobs:
matrix:
python-version: ["3.10"]


steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
Comment thread
johnrachwan123 marked this conversation as resolved.
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "${HOME}/.local/bin" >> $GITHUB_PATH

- name: Configure Poetry to not create virtual environments
run: poetry config virtualenvs.create false
- uses: astral-sh/setup-uv@v6
with:
enable-cache: true

- name: Install dependencies
run: pip install -e .[cpu]
run: |
uv pip install -e .[cpu]

- name: Remove .so files
run: find . -name "*.so" -delete

- name: Run generation script
run: python docs/utils/gen_docs.py
run: uv run docs/utils/gen_docs.py

- name: Verify generated file exists
run: |
Expand Down
22 changes: 7 additions & 15 deletions .github/workflows/installation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,19 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]


steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry on Windows
if: runner.os == 'Windows'
run: |
powershell -Command "(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python - --version 1.8.5"
echo "$(python -m site --user-base)\Scripts" >> $env:GITHUB_PATH

- name: Install Poetry on Unix
if: runner.os != 'Windows'
run: |
curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.8.5 python3 -
echo "$(python3 -m site --user-base)/bin" >> $GITHUB_PATH
- uses: astral-sh/setup-uv@v6
with:
enable-cache: true

- name: Install dependencies
run: pip install -e .
run: |
uv pip install -e .
32 changes: 9 additions & 23 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,41 +18,27 @@ jobs:
python-version: ["3.10"]

steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: abatilo/actions-poetry@v2

- name: Update Poetry lock file
run: poetry lock

- name: Cache Poetry virtualenv
uses: actions/cache@v3
- uses: astral-sh/setup-uv@v6
with:
path: ~/.cache/pypoetry/virtualenvs
key: poetry-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
poetry-${{ runner.os }}-${{ matrix.python-version }}

- name: Install dependencies using Poetry
run: poetry install --extras tests
enable-cache: true

- name: Remove .so files
run: find . -name "*.so" -delete
- name: Install dependencies
run: |
uv sync --extra tests

- name: Run ruff on Pruna code
uses: astral-sh/ruff-action@v3
with:
version: "latest"

- name: Run mypy on Pruna code
run: poetry run mypy --show-traceback src/pruna
run: uv run mypy --show-traceback src/pruna

- name: Run docstring checks with pytest
run: poetry run pytest -m "style"
run: uv run pytest -m "style"
14 changes: 8 additions & 6 deletions .github/workflows/package_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@v3
- uses: astral-sh/setup-uv@v6
with:
enable-cache: true

- name: Build Wheel
- name: Build
run: |
uv build

Expand All @@ -40,4 +41,5 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: ${{ steps.get_wheel.outputs.wheel_name }}
path: dist/*.whl
path: dist/*.whl
retention-days: 7
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,6 @@ ipython_config.py
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
Expand Down
13 changes: 9 additions & 4 deletions pyproject.toml
Comment thread
davidberenstein1957 marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ line-length = 121
[tool.ruff.lint]
ignore = ["ANN002", "ANN003", "ANN401", "C901", "D100", "D104", "D401", "D406", "C408"]
select = ["A", "C", "CPY", "D", "E", "ERA", "F", "FIX", "I", "N", "SIM", "T20", "W", "FA"]
preview = true # enable preview features for copyright checking
preview = true # enable preview features for copyright checking

[tool.ruff.lint.per-file-ignores]
"*.ipynb" = ["ERA", "CPY", "T"] # commented out code is intended for tutorials
Expand All @@ -31,7 +31,7 @@ description = "Smash your AI models"
authors = [
{name = "Pruna AI", email = "hello@pruna.ai"}
]
license = {text = "Apache-2.0"}
license = {file = "LICENSE"}
readme = "README.md"
requires-python = ">=3.9,<3.13"
keywords = ["AI", "machine learning", "model optimization", "pruning"]
Expand Down Expand Up @@ -107,7 +107,8 @@ gptq = [
"threadpoolctl",
"device-smi",
"random-word",
"gptqmodel==4.0.0.dev0+cu126torch2.7",
"gptqmodel==4.0.0.dev0+cu126torch2.7; sys_platform != 'darwin' or platform_machine != 'arm64'",
Comment thread
davidberenstein1957 marked this conversation as resolved.
"gptqmodel; sys_platform == 'darwin' and platform_machine == 'arm64'",
Comment thread
davidberenstein1957 marked this conversation as resolved.
"logbar",
"tokenicer",
"threadpoolctl",
Expand Down Expand Up @@ -159,4 +160,8 @@ include = ["**/*.so"]
exclude = [
"tests*",
"docs*",
]
]

[[tool.uv.index]]
name = "pruna"
url = "https://prunaai.pythonanywhere.com/"
Loading