Skip to content

Commit 019be81

Browse files
committed
Merge branch 'main' into array-api
2 parents 102b4a1 + 06760e1 commit 019be81

File tree

7 files changed

+16
-14
lines changed

7 files changed

+16
-14
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- uses: actions/checkout@v5
2424

2525
- name: Set up Python ${{ matrix.python-version }}
26-
uses: actions/setup-python@v5
26+
uses: actions/setup-python@v6
2727
with:
2828
python-version: ${{ matrix.python-version }}
2929

.github/workflows/cibuildwheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
uses: actions/checkout@v5
6464

6565
- name: Set up Python
66-
uses: actions/setup-python@v5
66+
uses: actions/setup-python@v6
6767
with:
6868
# Use the most recent released python
6969
python-version: '3.x'

.github/workflows/wasm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
uses: actions/checkout@v5
3434

3535
- name: Set up Python
36-
uses: actions/setup-python@v5
36+
uses: actions/setup-python@v6
3737
with:
3838
python-version: '3.x'
3939

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ci:
77
default_stages: [pre-commit, pre-push]
88
repos:
99
- repo: https://github.com/pre-commit/pre-commit-hooks
10-
rev: v5.0.0
10+
rev: v6.0.0
1111
hooks:
1212
- id: check-yaml
1313
- id: end-of-file-fixer
@@ -16,7 +16,7 @@ repos:
1616
- id: trailing-whitespace
1717

1818
- repo: https://github.com/astral-sh/ruff-pre-commit
19-
rev: v0.12.7
19+
rev: v0.12.11
2020
hooks:
2121
- id: ruff-check
2222
args: ["--fix", "--show-fixes"]

bench/pack_tensor.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
ctoc = time.time()
5050
tc = (ctoc - ctic) / NREP
5151
print(
52-
f" Time for tensorflow (tf.io.serialize):\t{tc:.3f} s ({(N * 8 / tc) / 2**30:.2f} GB/s)) ",
52+
f" Time for tensorflow (tf.io.serialize):\t{tc:.3f} s ({(N * 4 / tc) / 2**30:.2f} GB/s)) ",
5353
end="",
5454
)
5555
print(f"\tcr: {in_.size * in_.dtype.itemsize * 1.0 / len(c):5.1f}x")
@@ -66,7 +66,7 @@
6666
ctoc = time.time()
6767
tc = (ctoc - ctic) / NREP
6868
print(
69-
f" Time for torch (torch.save):\t\t\t{tc:.3f} s ({(N * 8 / tc) / 2**30:.2f} GB/s)) ",
69+
f" Time for torch (torch.save):\t\t\t{tc:.3f} s ({(N * 4 / tc) / 2**30:.2f} GB/s)) ",
7070
end="",
7171
)
7272
buff.seek(0)
@@ -87,7 +87,7 @@
8787
ctoc = time.time()
8888
tc = (ctoc - ctic) / NREP
8989
print(
90-
f" Time for tensorflow (blosc2.pack_tensor):\t{tc:.3f} s ({(N * 8 / tc) / 2**30:.2f} GB/s)) ",
90+
f" Time for tensorflow (blosc2.pack_tensor):\t{tc:.3f} s ({(N * 4 / tc) / 2**30:.2f} GB/s)) ",
9191
end="",
9292
)
9393
print(f"\tcr: {in_.size * in_.dtype.itemsize * 1.0 / len(c):5.1f}x")
@@ -103,7 +103,7 @@
103103
ctoc = time.time()
104104
tc = (ctoc - ctic) / NREP
105105
print(
106-
f" Time for torch (blosc2.pack_tensor):\t\t{tc:.3f} s ({(N * 8 / tc) / 2**30:.2f} GB/s)) ",
106+
f" Time for torch (blosc2.pack_tensor):\t\t{tc:.3f} s ({(N * 4 / tc) / 2**30:.2f} GB/s)) ",
107107
end="",
108108
)
109109
print(f"\tcr: {in_.size * in_.dtype.itemsize * 1.0 / len(c):5.1f}x")
@@ -122,7 +122,7 @@
122122
dtoc = time.time()
123123
td = (dtoc - dtic) / NREP
124124
print(
125-
f" Time for tensorflow (tf.io.parse_tensor):\t{td:.3f} s ({(N * 8 / td) / 2**30:.2f} GB/s)) ",
125+
f" Time for tensorflow (tf.io.parse_tensor):\t{td:.3f} s ({(N * 4 / td) / 2**30:.2f} GB/s)) ",
126126
)
127127

128128
with open("serialize_torch.bin", "rb") as f:
@@ -136,7 +136,7 @@
136136
dtoc = time.time()
137137
td = (dtoc - dtic) / NREP
138138
print(
139-
f" Time for torch (torch.load):\t\t\t{td:.3f} s ({(N * 8 / td) / 2**30:.2f} GB/s)) ",
139+
f" Time for torch (torch.load):\t\t\t{td:.3f} s ({(N * 4 / td) / 2**30:.2f} GB/s)) ",
140140
)
141141

142142
with open("pack_tensorflow.bl2", "rb") as f:
@@ -149,7 +149,7 @@
149149
dtoc = time.time()
150150
td = (dtoc - dtic) / NREP
151151
print(
152-
f" Time for tensorflow (blosc2.unpack_tensor):\t{td:.3f} s ({(N * 8 / td) / 2**30:.2f} GB/s)) ",
152+
f" Time for tensorflow (blosc2.unpack_tensor):\t{td:.3f} s ({(N * 4 / td) / 2**30:.2f} GB/s)) ",
153153
)
154154
assert np.array_equal(in_, out)
155155

@@ -165,6 +165,6 @@
165165

166166
td = (dtoc - dtic) / NREP
167167
print(
168-
f" Time for torch (blosc2.unpack_tensor):\t{td:.3f} s ({(N * 8 / td) / 2**30:.2f} GB/s)) ",
168+
f" Time for torch (blosc2.unpack_tensor):\t{td:.3f} s ({(N * 4 / td) / 2**30:.2f} GB/s)) ",
169169
)
170170
assert np.array_equal(in_, out)

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ exclude = ["bench*", ".github*"]
101101

102102
[tool.ruff]
103103
line-length = 109
104+
# Raise complexity from the default 10 to 13
105+
complexity = 13
104106
extend-exclude = ["bench"]
105107

106108
[tool.ruff.lint]

src/blosc2/embed_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class EmbedStore:
3131
Parameters
3232
----------
3333
urlpath : str or None, optional
34-
Path for persistent storage. Using a ' .b2e' extension is recommended.
34+
Path for persistent storage. Using a '.b2e' extension is recommended.
3535
If None, the embed store will be in memory only, which can be
3636
deserialized later using the :func:`blosc2.from_cframe` function.
3737
mode : str, optional

0 commit comments

Comments
 (0)