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

Releasing for python 3.12/3.13 and testing on 3.11. #393

Merged
merged 4 commits into from
Nov 27, 2023
Merged
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
20 changes: 10 additions & 10 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,24 @@ jobs:
platform: linux
- os: windows
ls: dir
interpreter: 3.7 3.8 3.9 3.10 3.11 3.12 pypy3.8 pypy3.9 pypy3.10
interpreter: 3.7 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.8 pypy3.9 pypy3.10
- os: windows
ls: dir
target: i686
python-architecture: x86
interpreter: 3.7 3.8 3.9 3.10 3.11
interpreter: 3.7 3.8 3.9 3.10 3.11 3.12 3.13
- os: windows
ls: dir
target: x86_64
python-architecture: x64
interpreter: 3.7 3.8 3.9 3.10 3.11
interpreter: 3.7 3.8 3.9 3.10 3.11 3.12 3.13
# - os: windows
# ls: dir
# target: aarch64
# interpreter: 3.11 3.12
- os: macos
target: aarch64
interpreter: 3.7 3.8 3.9 3.10 3.11 3.12 pypy3.8 pypy3.9 pypy3.10
interpreter: 3.7 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.8 pypy3.9 pypy3.10
- os: ubuntu
platform: linux
target: i686
Expand All @@ -65,7 +65,7 @@ jobs:
- os: ubuntu
platform: linux
target: armv7
interpreter: 3.7 3.8 3.9 3.10 3.11 3.12
interpreter: 3.7 3.8 3.9 3.10 3.11 3.12 3.13
# musllinux
- os: ubuntu
platform: linux
Expand All @@ -78,11 +78,11 @@ jobs:
- os: ubuntu
platform: linux
target: ppc64le
interpreter: 3.7 3.8 3.9 3.10 3.11 3.12
interpreter: 3.7 3.8 3.9 3.10 3.11 3.12 3.13
- os: ubuntu
platform: linux
target: s390x
interpreter: 3.7 3.8 3.9 3.10 3.11 3.12
interpreter: 3.7 3.8 3.9 3.10 3.11 3.12 3.13
exclude:
# Optimized PGO builds for x86_64 manylinux and windows follow a different matrix,
# maybe in future maturin-action can support this automatically
Expand All @@ -102,7 +102,7 @@ jobs:
- name: set up python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'
architecture: ${{ matrix.python-architecture || 'x64' }}

- run: pip install -U twine
Expand All @@ -114,7 +114,7 @@ jobs:
working-directory: ./bindings/python
manylinux: ${{ matrix.manylinux || 'auto' }}
container: ${{ matrix.container }}
args: --release --out dist --interpreter ${{ matrix.interpreter || '3.7 3.8 3.9 3.10 3.11 3.12 pypy3.7 pypy3.8 pypy3.9 pypy3.10' }} ${{ matrix.extra-build-args }}
args: --release --out dist --interpreter ${{ matrix.interpreter || '3.7 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.7 pypy3.8 pypy3.9 pypy3.10' }} ${{ matrix.extra-build-args }}
rust-toolchain: stable
docker-options: -e CI

Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"
architecture: x64

- name: Retrieve all wheels
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
# Lowest and highest, no version specified so that
# new releases get automatically tested against
version: [{torch: torch==1.10, python: "3.8"}, {torch: torch, python: "3.10"}]
version: [{torch: torch==1.10, python: "3.8"}, {torch: torch, python: "3.11"}]
defaults:
run:
working-directory: ./bindings/python
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Install
run: |
pip install -U pip
pip install .[numpy,tensorflow,paddlepaddle]
pip install .[numpy,tensorflow]
pip install ${{ matrix.version.torch }}

- name: Install (jax, flax)
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ memmap2 = "0.5"
serde_json = "1.0"

[dependencies.safetensors]
version = "0.4.1-dev.0"
version = "0.4.2-dev.0"
path = "../../safetensors"
11 changes: 9 additions & 2 deletions bindings/python/tests/test_paddle_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@

import numpy as np

import paddle
from safetensors.paddle import load_file, save_file

try:
import paddle
from safetensors.paddle import load_file, save_file

HAS_PADDLE = True
except ImportError:
HAS_PADDLE = False


@unittest.skipIf(not HAS_PADDLE, "Paddle is not available")
class SafeTestCase(unittest.TestCase):
def setUp(self):
data = {
Expand Down
Loading