Expand description
Core types and traits for the Soma computational graph runtime.
A graph holds two kinds of node, and this crate defines both sides of
that split. A Filter computes — deterministic, content-cacheable,
fit/forward. A Step decides — it polls, asks the
runtime to perform Effects (a model, a tool, another
graph), and returns a Transition. One
NodeMeta describes either kind; one
NodeOutcome says how either kind finished.
Everything downstream reads the metadata, never the kind.
The contracts every other crate depends on:
Filter— the computation unit (fit/forward)Step/Effect— the decision unit and what it asks for; effects are journaled, filters are cachedValue— typed data flowing between nodes (Tensor, JSON, Bytes)Graph— DAG of nodes and edges, computational and effectful alikeCacheKey/CacheStore— content-addressable cachingDataStore— abstraction for moving data between workersSchema— dtype + shape for compile-time validation, on every edgeEvent— runtime lifecycle events
Re-exports§
pub use cache::CacheKey;pub use cache::CacheStore;pub use cache::CacheTier;pub use cache::EntryMeta;pub use cache::Origin;pub use control::LoopCondition;pub use control::LoopSignal;pub use control::read_arm_selector;pub use control::read_loop_signal;pub use effect::Effect;pub use effect::EffectResult;pub use effect::GraphEffectMode;pub use effect::JoinPolicy;pub use effect::LlmRequest;pub use effect::LlmResponse;pub use effect::NodeSpec;pub use effect::StopReason;pub use effect::SuspendReason;pub use effect::ToolSpec;pub use effect::Usage;pub use error::Result;pub use error::SomaError;pub use event::Event;pub use event::MetricRecord;pub use event::PlanSummary;pub use event::RunId;pub use event::StudyId;pub use event::TrialId;pub use filter::Distribution;pub use filter::Filter;pub use filter::FilterKind;pub use filter::FilterMeta;pub use filter::RemoteTarget;pub use filter::StreamMode;pub use fingerprint::ArchitectureFingerprint;pub use fingerprint::EdgeRef;pub use fingerprint::pipeline_summary;pub use fingerprint::structural_similarity;pub use graph::Edge;pub use graph::EdgeKind;pub use graph::Graph;pub use graph::Node;pub use graph::NodeId;pub use message::ContentBlock;pub use message::Message;pub use message::Messages;pub use message::Role;pub use schema::DataType;pub use schema::Dimension;pub use schema::Schema;pub use search::Scale;pub use search::SearchDimension;pub use search::SearchSpace;pub use search::Searchable;pub use state::MemoryStateStore;pub use state::StateStore;pub use step::Step;pub use step::StepCtx;pub use step::StepMeta;pub use step::Transition;pub use store::DataRef;pub use store::DataStore;pub use store::LocalDataStore;pub use store::StorageConfig;pub use store::StoreMeta;pub use store::StreamFormat;pub use store::slice_tensor_rows;pub use strategy::ClientSelection;pub use strategy::CommunicationProtocol;pub use strategy::ExploitStrategy;pub use strategy::ExploreStrategy;pub use strategy::FederatedAggregation;pub use strategy::GradientAggregation;pub use strategy::Partition;pub use strategy::TrainingStrategy;pub use study::CompositeObjective;pub use study::Direction;pub use study::Objective;pub use study::PruningStrategy;pub use study::Scalarizer;pub use study::SearchStrategy;pub use study::Study;pub use study::Trial;pub use study::TrialState;pub use summary::FlagCount;pub use summary::NodeCost;pub use summary::RunConclusion;pub use summary::RunOutcome;pub use summary::RunSummary;pub use summary::TrialSummary;pub use summary::human_duration;pub use tracking::EventEnvelope;pub use tracking::EventSink;pub use tracking::GitInfo;pub use tracking::GraphSummaryInfo;pub use tracking::RUN_SCHEMA_VERSION;pub use tracking::RunKind;pub use tracking::RunManifest;pub use tracking::RunState;pub use tracking::RunStatus;pub use tracking::Tracker;pub use value::Value;pub use virtual_value::ValueStatus;pub use virtual_value::VirtualValue;pub use viz::GraphOverlay;pub use viz::NodeOverlay;pub use viz::NodeStatus;
Modules§
- action
- Two-table cache model: action records + content-addressed blobs.
- any
- Downcasting, without every implementor writing the same three lines.
- cache
- Content-addressable caching — keys, traits, and metadata.
- canon
- Canonical, deterministic serialization for cache-key hashing.
- codec
SOMA1framed binary codec forValue.- control
- Data-dependent control flow: how a loop decides to stop and how a branch picks an arm.
- effect
- Effects: the things a step can ask the runtime to do for it.
- error
- Error types for the Soma runtime.
- event
- Runtime lifecycle events — emitted during plan execution.
- filter
- The Filter trait — the fundamental computation unit in Soma.
- fingerprint
- Architecture fingerprints — a stable identity for a graph’s shape.
- graph
- Computational graph — DAG of filter nodes connected by edges.
- keys
- Reserved keys in a run’s output store.
- message
- The canonical conversation shape.
- node
- What the compiler and executor need to know about a node, whichever kind it is.
- schema
- Schema — dtype and shape for compile-time type checking between filters.
- search
- Search spaces for hyperparameter optimization.
- state
- Trained-state storage — authoritative data produced by
fit(). - step
- The effectful counterpart to
crate::filter::Filter. - store
- Data Store: abstraction for moving data between workers.
- strategy
- Training strategies for distributed execution.
- study
- Study — defines an optimization experiment with objectives and strategy.
- summary
- What a run says about itself — the data half.
- svg
- Self-contained SVG rendering of a
Graph— no JavaScript, no external tools. - tool
- How a tool describes itself.
- tracking
- Experiment tracking types: run manifests, status, event envelopes,
and the
EventSink/Trackertraits. - util
- Shared utility functions.
- value
- Typed values flowing between filters in a pipeline.
- virtual_
value - Virtual values — lazy references to data that can be materialized on demand.
- viz
- Rendering overlays for graph visualization.
Derive Macros§
- Soma
Filter - Derive macro for generating
config_hash()andSearchableimplementations. - Soma
Step - Derive
config_hashfor aStep.