Coverage for openhcs/core/memory/__init__.py: 100.0%

10 statements  

« prev     ^ index     » next       coverage.py v7.11.0, created at 2025-11-04 02:09 +0000

1"""Memory module for OpenHCS.""" 

2 

3from openhcs.constants.constants import MemoryType 

4from .decorators import cupy, jax, memory_types, numpy, tensorflow, torch 

5from .converters import convert_memory, detect_memory_type 

6 

7# Define memory type constants 

8MEMORY_TYPE_NUMPY = MemoryType.NUMPY.value 

9MEMORY_TYPE_CUPY = MemoryType.CUPY.value 

10MEMORY_TYPE_TORCH = MemoryType.TORCH.value 

11MEMORY_TYPE_TENSORFLOW = MemoryType.TENSORFLOW.value 

12MEMORY_TYPE_JAX = MemoryType.JAX.value 

13MEMORY_TYPE_PYCLESPERANTO = MemoryType.PYCLESPERANTO.value 

14 

15__all__ = [ 

16 'convert_memory', 

17 'detect_memory_type', 

18 'MEMORY_TYPE_NUMPY', 

19 'MEMORY_TYPE_CUPY', 

20 'MEMORY_TYPE_TORCH', 

21 'MEMORY_TYPE_TENSORFLOW', 

22 'MEMORY_TYPE_JAX', 

23 'MEMORY_TYPE_PYCLESPERANTO', 

24 'memory_types', 

25 'numpy', 

26 'cupy', 

27 'torch', 

28 'tensorflow', 

29 'jax', 

30]