Skip to main content

somatize

Declare a computation as a graph, run it, train it, and search over it — on this machine or across several — with what happened written down as you go.

pip install somatize
from somatize import Graph, Node

class Tokenise(Node):
    def forward(self, text, ctx):
        return text.lower().split()

class MeanLength(Node):
    def forward(self, words, ctx):
        return sum(len(w) for w in words) / len(words)

g = Graph.somatize(Tokenise().named("tokenise") >> MeanLength().named("mean"))
g.forward("The cat sat on the mat")   # 2.8333333333333335

>> chains, | fans out, and a node carries where it runs (.at()), whether its result is kept (.cached()), and whether it learns (.frozen()). The graph draws itself before it has ever run.

What is here

The engine is Rust; the surface is Python. Nine crates, each one a thing you can name:

somatize-core the graph, the plan of how to run it, and the engine that walks it
somatize-store where a computed value is kept: bytes by content, names that point at them
somatize-data where the data comes from, and what it is once it arrives
somatize-study what is above one training run: a search over configurations
somatize-health whether what a run did is healthy — an opinion, and it says so
somatize-tree what an edit did to a graph, said before anybody runs it
somatize-fabric-wire carrying a slice of a plan to another process
somatize-fabric-broker the name a graph gave a host, turned into a way of reaching it

The API reference is at manucouto1.github.io/soma.

Start here

examples/ holds twelve notebooks, shipped with their outputs, so opening one shows what it does without running anything: declaring a graph, watching a run, training, a study, the health of a network, one problem end to end, a real architecture diagnosed in cycles, what can be said before a step is taken, a fleet of machines, where the data comes from, what an edit did, and where a kept value came from.

The optional halves are extras, because a graph declares, executes and trains without either:

pip install 'somatize[viz]'      # plotly, for every figure
pip install 'somatize[remote]'   # cloudpickle, for a worker that starts empty

Building it

uv run cargo test --workspace
cd soma-python && maturin develop && python -m pytest tests/ -q

maturin develop is not optional before pytest: the Python tests run against the installed extension, so a change in soma-python/src/ that is not rebuilt means the suite is green about code that is not the code.

There is more, and it is opt-in because it is slow: a cluster of real containers (SOMA_CLUSTER=1 python -m pytest tests/cluster) and a real bucket (docker compose -f soma-store/tests/docker/compose.yaml up -d). Both are described in CLAUDE.md.

Licence

Elastic License 2.0. The somatize versions up to 0.5.1 are a different implementation, kept on the legacy-0.5 branch.

Metadata

Release files for somatize 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for somatize 1.0.1
File Size Uploaded Provenance Actions
somatize-1.0.1.tar.gz 713.8 kB With provenance Details for somatize-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for somatize 1.0.1
File Interpreter ABI Platform Actions
somatize-1.0.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for somatize-1.0.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Total release size: 6.8 MB

Release files / somatize-1.0.1.tar.gz

Download URL somatize-1.0.1.tar.gz
Size 713.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b29c1f2bafd8a03ded99f4045ef37165ebe7884b0317a8aeb9203308f1546874
BLAKE2b-256 checksum
How to use checksums
21f6c95d5a5ef8c61810b00c4e98f1f167f270b5b24758fa3774ccd172273c96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release files / somatize-1.0.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL somatize-1.0.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 6.1 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
e19d3694b1471515e2392943228f7ade11086a7897cd4a82e409307fb075b1c5
BLAKE2b-256 checksum
How to use checksums
1749cf4b70d23272320f7ea3a70a8754ffb380d51d388526618e29346d4efe74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Security for somatize 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for somatize-1.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page