Skip to content

Commit 2b2d809

Browse files
authored
Merge branch 'main' into chore/benchmarks
2 parents 93ea2e2 + 182504c commit 2b2d809

File tree

14 files changed

+43
-25
lines changed

14 files changed

+43
-25
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
blank_issues_enabled: true
22
contact_links:
3-
- name: Propose a new major feature
3+
- name: Propose a new Zarr specification feature
44
url: https://github.com/zarr-developers/zarr-specs
5-
about: A new major feature should be discussed in the Zarr specifications repository.
5+
about: A new feature for the Zarr storage specification should be opened on the zarr-specs repository.
66
- name: Discuss something on ZulipChat
77
url: https://ossci.zulipchat.com/
88
about: For questions like "How do I do X with Zarr?", consider posting your question to our developer chat.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Feature Request
2+
description: Request a new feature for zarr-python
3+
# labels: []
4+
body:
5+
- type: textarea
6+
attributes:
7+
label: Describe the new feature you'd like
8+
description: >
9+
Please provide a description of what new feature or functionality you'd like to see in zarr-python.
10+
validations:
11+
required: true

changes/3526.feature.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/user-guide/performance.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,18 @@ Coming soon.
175175

176176
## Parallel computing and synchronization
177177

178-
Zarr is designed to support parallel computing and enables concurrent reads and writes to arrays. This section covers how to optimize Zarr's concurrency settings for different parallel computing scenarios.
178+
Zarr is designed to support parallel computing and enables concurrent reads and writes to arrays.
179+
This section covers how to optimize Zarr's concurrency settings for different parallel computing
180+
scenarios.
179181

180182
### Concurrent I/O operations
181183

182-
Zarr uses asynchronous I/O internally to enable concurrent reads and writes across multiple chunks. The level of concurrency is controlled by the `async.concurrency` configuration setting, which determines the maximum number of concurrent I/O operations.
184+
Zarr uses asynchronous I/O internally to enable concurrent reads and writes across multiple chunks.
185+
The level of concurrency is controlled by the `async.concurrency` configuration setting, which
186+
determines the maximum number of concurrent I/O operations.
183187

184-
The default value is 64, which provides good performance for most workloads. You can adjust this value based on your specific needs:
188+
The default value is 10, which is a conservative value. You may get improved performance by tuning
189+
the concurrency limit. You can adjust this value based on your specific needs:
185190

186191
```python
187192
import zarr
@@ -265,7 +270,7 @@ If an array or group is backed by a persistent store such as the a `zarr.storage
265270
**are not** pickled. The only thing that is pickled is the necessary parameters to allow the store
266271
to re-open any underlying files or databases upon being unpickled.
267272

268-
E.g., pickle/unpickle an local store array:
273+
E.g., pickle/unpickle a local store array:
269274

270275
```python exec="true" session="performance" source="above" result="ansi"
271276
import pickle

src/zarr/core/buffer/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class Buffer(ABC):
125125
126126
We use Buffer throughout Zarr to represent a contiguous block of memory.
127127
128-
A Buffer is backed by a underlying array-like instance that represents
128+
A Buffer is backed by an underlying array-like instance that represents
129129
the memory. The memory type is unspecified; can be regular host memory,
130130
CUDA device memory, or something else. The only requirement is that the
131131
array-like instance can be copied/converted to a regular Numpy array
@@ -315,7 +315,7 @@ class NDBuffer:
315315
316316
We use NDBuffer throughout Zarr to represent a n-dimensional memory block.
317317
318-
A NDBuffer is backed by a underlying ndarray-like instance that represents
318+
A NDBuffer is backed by an underlying ndarray-like instance that represents
319319
the memory. The memory type is unspecified; can be regular host memory,
320320
CUDA device memory, or something else. The only requirement is that the
321321
ndarray-like instance can be copied/converted to a regular Numpy array

src/zarr/core/buffer/gpu.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Buffer(core.Buffer):
3636
3737
We use Buffer throughout Zarr to represent a contiguous block of memory.
3838
39-
A Buffer is backed by a underlying array-like instance that represents
39+
A Buffer is backed by an underlying array-like instance that represents
4040
the memory. The memory type is unspecified; can be regular host memory,
4141
CUDA device memory, or something else. The only requirement is that the
4242
array-like instance can be copied/converted to a regular Numpy array
@@ -90,7 +90,7 @@ def create_zero_length(cls) -> Self:
9090

9191
@classmethod
9292
def from_buffer(cls, buffer: core.Buffer) -> Self:
93-
"""Create an GPU Buffer given an arbitrary Buffer
93+
"""Create a GPU Buffer given an arbitrary Buffer
9494
This will try to be zero-copy if `buffer` is already on the
9595
GPU and will trigger a copy if not.
9696
@@ -123,7 +123,7 @@ class NDBuffer(core.NDBuffer):
123123
124124
We use NDBuffer throughout Zarr to represent a n-dimensional memory block.
125125
126-
A NDBuffer is backed by a underlying ndarray-like instance that represents
126+
A NDBuffer is backed by an underlying ndarray-like instance that represents
127127
the memory. The memory type is unspecified; can be regular host memory,
128128
CUDA device memory, or something else. The only requirement is that the
129129
ndarray-like instance can be copied/converted to a regular Numpy array

src/zarr/core/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def enable_gpu(self) -> ConfigSet:
9797
"order": "C",
9898
"write_empty_chunks": False,
9999
},
100-
"async": {"concurrency": 64, "timeout": None},
100+
"async": {"concurrency": 10, "timeout": None},
101101
"threading": {"max_workers": None},
102102
"json_indent": 2,
103103
"codec_pipeline": {

src/zarr/core/dtype/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def check_structured_dtype_name_v2(data: Sequence[object]) -> TypeGuard[Structur
9898

9999
def check_dtype_name_v2(data: object) -> TypeGuard[DTypeName_V2]:
100100
"""
101-
Type guard for narrowing the type of a python object to an valid zarr v2 dtype name.
101+
Type guard for narrowing the type of a python object to a valid zarr v2 dtype name.
102102
"""
103103
if isinstance(data, str):
104104
return True

src/zarr/errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class MetadataValidationError(BaseZarrError):
9191

9292
class UnknownCodecError(BaseZarrError):
9393
"""
94-
Raised when a unknown codec was used.
94+
Raised when an unknown codec was used.
9595
"""
9696

9797

src/zarr/registry.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,11 @@ def _parse_array_bytes_codec(data: dict[str, JSON] | Codec) -> ArrayBytesCodec:
227227
if isinstance(data, dict):
228228
result = _resolve_codec(data)
229229
if not isinstance(result, ArrayBytesCodec):
230-
msg = f"Expected a dict representation of a ArrayBytesCodec; got a dict representation of a {type(result)} instead."
230+
msg = f"Expected a dict representation of an ArrayBytesCodec; got a dict representation of a {type(result)} instead."
231231
raise TypeError(msg)
232232
else:
233233
if not isinstance(data, ArrayBytesCodec):
234-
raise TypeError(f"Expected a ArrayBytesCodec. Got {type(data)} instead.")
234+
raise TypeError(f"Expected an ArrayBytesCodec. Got {type(data)} instead.")
235235
result = data
236236
return result
237237

@@ -247,11 +247,11 @@ def _parse_array_array_codec(data: dict[str, JSON] | Codec) -> ArrayArrayCodec:
247247
if isinstance(data, dict):
248248
result = _resolve_codec(data)
249249
if not isinstance(result, ArrayArrayCodec):
250-
msg = f"Expected a dict representation of a ArrayArrayCodec; got a dict representation of a {type(result)} instead."
250+
msg = f"Expected a dict representation of an ArrayArrayCodec; got a dict representation of a {type(result)} instead."
251251
raise TypeError(msg)
252252
else:
253253
if not isinstance(data, ArrayArrayCodec):
254-
raise TypeError(f"Expected a ArrayArrayCodec. Got {type(data)} instead.")
254+
raise TypeError(f"Expected an ArrayArrayCodec. Got {type(data)} instead.")
255255
result = data
256256
return result
257257

0 commit comments

Comments
 (0)