Skip to main content

somatize_core/
lib.rs

1//! Core types and traits for the Soma computational graph runtime.
2//!
3//! This crate defines the contracts that all other crates depend on:
4//! - [`Filter`] — the computation unit (fit/forward)
5//! - [`Value`] — typed data flowing between filters (Tensor, JSON, Bytes)
6//! - [`Graph`] — DAG of filter nodes and edges
7//! - [`CacheKey`] / [`CacheStore`] — content-addressable caching
8//! - [`DataStore`] — abstraction for moving data between workers
9//! - [`Schema`] — dtype + shape for compile-time validation
10//! - [`Event`] — runtime lifecycle events
11
12pub mod cache;
13pub mod error;
14pub mod event;
15pub mod filter;
16pub mod graph;
17pub mod schema;
18pub mod search;
19pub mod state;
20pub mod store;
21pub mod strategy;
22pub mod study;
23pub mod util;
24pub mod value;
25pub mod virtual_value;
26
27// Re-export core types for convenience.
28pub use cache::{CacheKey, CacheStore, CacheTier, EntryMeta, Origin};
29pub use error::{Result, SomaError};
30pub use event::{Event, MetricRecord, PlanSummary, RunId, StudyId, TrialId};
31pub use filter::{Distribution, Filter, FilterKind, FilterMeta, RemoteTarget, StreamMode};
32pub use graph::{Edge, EdgeKind, Graph, Node, NodeId};
33pub use schema::{DataType, Dimension, Schema};
34pub use search::{Scale, SearchDimension, SearchSpace, Searchable};
35pub use state::{MemoryStateStore, StateStore};
36#[cfg(feature = "s3")]
37pub use store::S3DataStore;
38#[cfg(feature = "zarr")]
39pub use store::ZarrStore;
40pub use store::{
41    DataRef, DataStore, LocalDataStore, StorageConfig, StoreMeta, StreamCache, StreamFormat,
42    slice_tensor_rows,
43};
44pub use strategy::{
45    ClientSelection, CommunicationProtocol, ExploitStrategy, ExploreStrategy, FederatedAggregation,
46    GradientAggregation, Partition, TrainingStrategy,
47};
48pub use study::{Direction, Objective, PruningStrategy, SearchStrategy, Study, Trial, TrialState};
49pub use value::Value;
50pub use virtual_value::{ValueStatus, VirtualValue};
51
52// Re-export derive macro
53pub use somatize_macros::SomaFilter;