Memory¶
- class laminar.configurations.datastores.Memory(root: str = 'memory:///', cache: ~typing.Dict[str, ~typing.Any] = <factory>, protocols: ~typing.Dict[str, ~laminar.configurations.serde.Protocol] = <factory>)¶
Bases:
DataStore
Store the laminar workspace in memory.
Usage:
Flow(datastore=Memory())
Methods
Check if a file exists in the datastore.
List all artifacts in a layer execution.
List all executions.
List all layers in an execution.
Register a custom serde protocol for a type.
Read from the laminar datastore.
Read an archive from the laminar datastore.
Read an artifact form the laminar datastore.
Read a layer record from the laminar datastore.
Given a path, generate a URI in the datastore.
Write to the laminar datastore.
Write an archive to the laminar datastore.
Write an arifact to the laminar datastore.
Write a layer record to the laminar datastore.
Attributes
URI root of the datastore
- __init__(root: str = 'memory:///', cache: ~typing.Dict[str, ~typing.Any] = <factory>, protocols: ~typing.Dict[str, ~laminar.configurations.serde.Protocol] = <factory>)¶
- cache : dict[str, Any]¶
Internal datastore cache
- protocol(*dtypes: type) Callable[[type[ProtocolType]], type[ProtocolType]] ¶
Register a custom serde protocol for a type.
Usage:
@datastore.protocol(pd.DataFrame) def DataFrameProtocol(serde.Protocol): ...
-
read_archive(*, layer: Layer, index: int, name: str, cache: bool =
False
) Archive ¶ Read an archive from the laminar datastore.
-
root : str =
'memory:///'
¶ URI root of the datastore
-
write_archive(*, layer: Layer, name: str, artifacts: list[Artifact], cache: bool =
False
) Archive ¶ Write an archive to the laminar datastore.