Skip to content
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
2 changes: 1 addition & 1 deletion docs/source/api/backends.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Array payload boundary
----------------------

ArrayBridge owns the memory-type taxonomy and framework conversion semantics.
``polystore.MemoryType`` is a compatibility re-export of
``polystore.MemoryType`` is a re-export of
``arraybridge.MemoryType`` with the same class identity. Disk, Zarr, and
streaming sinks normalize supported framework arrays through ArrayBridge when
a host NumPy payload is required; individual storage backends do not maintain
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "polystore"
version = "0.6.2"
version = "0.6.3"
description = "Framework-agnostic multi-backend storage abstraction for ML and scientific computing"
readme = "README.md"
requires-python = ">=3.11"
Expand Down Expand Up @@ -37,7 +37,7 @@ classifiers = [
]

dependencies = [
"arraybridge>=0.3.0",
"arraybridge>=0.5.0,<0.6",
"numpy>=1.26.0",
"portalocker>=2.8.0", # Cross-platform file locking
"metaclass-registry>=0.4.0",
Expand Down
17 changes: 4 additions & 13 deletions src/polystore/array_payload.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,15 @@
"""ArrayBridge-backed normalization at persistent storage boundaries."""

from typing import Any

import numpy as np
from arraybridge import ArrayPayload, convert_memory, detect_memory_type
from arraybridge.types import MemoryType
from arraybridge import ArrayPayload
from arraybridge.libraries import ArrayLibrary


def storage_numpy_array(data: Any) -> np.ndarray:
def storage_numpy_array(data: object) -> np.ndarray:
"""Return one supported array payload as a host NumPy array."""

if isinstance(data, ArrayPayload):
data = data.array_payload_data()
if isinstance(data, np.ndarray):
return data
source_type = detect_memory_type(data)
converted = convert_memory(
data,
source_type=source_type,
target_type=MemoryType.NUMPY,
gpu_id=0,
)
return np.asarray(converted)
return ArrayLibrary.of(data).to_numpy(data)
13 changes: 1 addition & 12 deletions src/polystore/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,7 @@

from enum import Enum

from arraybridge.types import (
CPU_MEMORY_TYPES as CPU_MEMORY_TYPES,
)
from arraybridge.types import (
GPU_MEMORY_TYPES as GPU_MEMORY_TYPES,
)
from arraybridge.types import (
SUPPORTED_MEMORY_TYPES as SUPPORTED_MEMORY_TYPES,
)
from arraybridge.types import (
MemoryType as MemoryType,
)
from arraybridge.types import MemoryType as MemoryType


class Backend(Enum):
Expand Down
51 changes: 0 additions & 51 deletions src/polystore/streaming/handlers/__init__.py

This file was deleted.

70 changes: 0 additions & 70 deletions src/polystore/streaming/handlers/fiji_images.py

This file was deleted.

Loading
Loading