dew.data.sources.grain
A Grain dataset read as a Dew store.
| Name | Summary |
|---|---|
Grain | A Grain MapDataset, read by index or as one stream, or an IterDataset, read as one stream whose position Grain checkpoints. |
from_grain | dataset as a Dew dataset, its content version identity where given (Grain). |
class Grain( dataset: grain.MapDataset | grain.IterDataset, identity: str | None = None, place: int = unnamed(),)A Grain MapDataset, read by index or as one stream, or an
IterDataset, read as one stream whose position Grain checkpoints. Grain
states no store of its own, so identity declares its content version in a
run’s plan, a cache’s key and its logs; with none, a run reads it and a
resume needs resume="non-exact", and no cache keys it (Manifest.exact).
Grain.label
Section titled “Grain.label”def label() -> strGrain.describe
Section titled “Grain.describe”def describe() -> strGrain.fingerprint
Section titled “Grain.fingerprint”def fingerprint() -> Mapping[str, object]Grain.supports
Section titled “Grain.supports”def supports(read: Read) -> boolGrain.records
Section titled “Grain.records”def records(read: Read) -> RecordsGrain.manifest
Section titled “Grain.manifest”def manifest(version: int) -> ShardManifestGrain.metadata
Section titled “Grain.metadata”def metadata() -> Mapping[str, object]Grain.lengths
Section titled “Grain.lengths”def lengths() -> np.ndarray | Nonefrom_grain
Section titled “from_grain”def from_grain( dataset: grain.MapDataset | grain.IterDataset, identity: str | None = None,) -> Graindataset as a Dew dataset, its content version identity where given (Grain).