Skip to content

Commit

Permalink
[altius-py] Use uv
Browse files Browse the repository at this point in the history
  • Loading branch information
maekawatoshiki committed Aug 23, 2024
1 parent 324078e commit 08737d3
Show file tree
Hide file tree
Showing 7 changed files with 2,517 additions and 525 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:
run: cargo install grcov
- name: Install dependencies
run: sudo apt install libomp-dev xz-utils
- name: Install rye
uses: eifinger/setup-rye@v2
- name: Install uv
uses: yezz123/setup-uv@v4
- name: Free up disk
run: sudo rm -rf /usr/local/lib/android || true
- name: Test
Expand All @@ -50,9 +50,9 @@ jobs:
LLVM_PROFILE_FILE: coverage-%p-%m.profraw
- name: Run examples
run: |
(cd crates/altius-py && rye run python deit.py)
# (cd crates/altius-py && rye run python resnet50.py)
(cd crates/altius-py && rye run python export_vit.py)
(cd crates/altius-py && uv run python deit.py)
# (cd crates/altius-py && uv run python resnet50.py)
(cd crates/altius-py && uv run python export_vit.py)
cargo run --release --example mnist
cargo run --release --example mobilenet
cargo run --release --example deit
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# Requirements

- cargo
- rye
- uv

# Run

Expand Down Expand Up @@ -62,7 +62,7 @@ yarn serve

```sh
cd ./crates/altius-py
rye sync --features linux # no --features needed on macOS
rye run maturin develop -r
rye run python mobilenet.py
uv sync
uv run maturin develop -r
uv run python mobilenet.py
```
15 changes: 9 additions & 6 deletions crates/altius-py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies = [
"matplotlib>=3.5.3",
"maturin>=1.1.0",
"onnx==1.15.0",
"transformers>=4.30.2",
"transformers==4.41.2",
"onnxsim==0.4.17",
"numpy>=1.25.2",
"onnxruntime>=1.15.1",
Expand All @@ -22,14 +22,17 @@ dependencies = [
"torchvision>=0.17.2",
"tabulate>=0.9.0",
"timm>=0.9.16",
"packaging>=24.1",
"einops>=0.8.0",
"fpzip>=1.2.4",
"zfpy>=1.0.0",
"onnxruntime-genai>=0.3.0",
"huggingface>=0.0.1",
"netron>=7.8.3",
"patchelf>=0.17.2.1; sys_platform == 'linux'",
]
requires-python = ">=3.9,<3.11"

[project.optional-dependencies]
linux = [
"patchelf>=0.17.2.1",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
Expand Down
248 changes: 0 additions & 248 deletions crates/altius-py/requirements-dev.lock

This file was deleted.

Loading

0 comments on commit 08737d3

Please sign in to comment.