recipes
recipes
#
Recipes — content-addressed pipeline caching over the type system.
Decomposed pure functions over CGType values become memoized,
garbage-collected pipeline stages, keyed by merkle hash in a managed scratch.
The package is three layers, bottom up, each ignorant of the one above:
- [.scratch][] — the store. A garbage-collected, content-addressed store of directory trees: objects, names, pins, and locks. It knows nothing about types.
- [.values][] — where a typed value meets the store: how it becomes an object tree, how it hashes, how a call's arguments hash, and the workspace a call writes into.
- [.calls][] — memoized calls and keyed state:
pure_functionandImpureState, the surface a recipe author touches. - [.progress][] — what a computation is doing right now, as a tree of steps
every memoized call,
mapandpmapreports into;cg.stepfor a body's own,cg.print_progressto watch from a terminal. - [.splats][] — the one recipe library shipped with the package: 3D Gaussian
splats from posed captures, trained on the GPU under
cg.lock("gpu").
testing ships the cg_scratch pytest fixture. This __init__ is
documentation-only. The root exports scratch and splats as folders
(cg.scratch.configure(), cg.splats.train()) and imports the values /
calls leaves directly (cg.pure_function, cg.ImpureState, cg.value_hash).