Non-Volatile Memory support#
dataClay includes support for non-volatile memory and in-memory processing.
If you want to manually set up the placement of data you can implement it
within active methods and the data model implementation. However, dataClay
ships the InNVM
annotation; this offers a transparent and automatic
in-NVM placement for class attributes.
- class dataclay.contrib.nvm.InNVM[source]#
Store a object attribute in non-volatile memory.
Attributes annotated with this will be stored and persisted to NVM transparently.
Usage (class definition):
class Experiment(DataClayObject): observations: Annotated[numpy.ndarray, InNVM()]
Example:
>>> e = Experiment() >>> e.make_persistent() >>> e.observations = np.array([1,2,3])