pub struct Snapshot {
pub commit: String,
pub built_from: String,
pub input: String,
pub environment: BTreeMap<String, String>,
pub snapshot: Value,
pub code: BTreeMap<String, Written>,
pub inside: Value,
pub reaches: Value,
pub architecture: Value,
pub declaring: Option<Written>,
pub mapped: Vec<String>,
pub unneeded: Vec<String>,
}Expand description
A graph as one checkout had it.
Fields§
§commit: StringWhat checkout this was, for saying so afterwards.
built_from: StringThe module:function that built it.
input: String"sentinel" when no real input was hashed. Two snapshots are only
comparable if they were taken the same way: the names come out of the
snapshot, so one taken with an input against one taken without has
everything moved and nothing saying why.
environment: BTreeMap<String, String>What the graph was built against: the interpreter, and the version of every distribution it reached for.
The axis git does not cover — a checkout pins its own code and not the interpreter outside it — and deliberately not part of the recipe a snapshot is remembered under. Two probes months apart are meant to disagree here out loud.
snapshot: Valueforeseen.snapshot’s own answer, carried opaque.
Never read on this side and never reshaped: what a name is made of is the model’s business, and a reader here that understood its insides would be a second model with a delay on it.
code: BTreeMap<String, Written>The class behind each node: where it lives and what it says.
Read while the graph existed, because a snapshot outlives the process that made it — and the checkout it was read from is a worktree that was removed minutes later.
inside: ValueWhat each node is made of inside: {node: [piece, ...]}.
A node is a box and what it holds is usually what the experiment is
about — Pure is a wrapper and the router inside it is the piece — so
drawing the box and saying nothing about the inside draws the wrapper.
Read without running anything, so it is the declared composition:
what __init__ built. somatize.torch.architecture answers better —
it sees what is not a module — and executes the graph to do it, which
is what this side never does. Opaque, like the rest.
reaches: ValueWhat files each node is made of, and where the count stops.
code shows one class, which is what somebody clicking a node wants.
But a network is often written across four modules joined in an
__init__, and inspect.getsourcefile knows only one of the four.
Not a second model of what depends on what: it is the transitive closure soma’s fingerprint already walked in order to hash it, said out loud, so it moves when what goes into a fingerprint moves.
No source inside, on purpose: forty commits of whole files are nearly all of the answer and none of it read. What is here are paths, and the content is asked for by its own when somebody opens one.
architecture: ValueThe orthogonal facts of a graph beside what each node computes: who implements it, where it runs, on which device, what is kept, what is frozen, and in what order it would run.
Opaque like snapshot: the vocabulary is soma’s, and all that is needed
here is that it reaches whoever draws intact.
declaring: Option<Written>The code that declares the graph: the body of build, with the
>> and the |.
The one part of a graph that cannot be read node by node — each class says what it does and none says how they connect — so without it the topology is only ever seen drawn and never written.
None when there is no source to read, which is the absence
UNVERSIONED names a level below.
mapped: Vec<String>The nodes named by the content of their items, which nobody has before a run. Carried so a report can say cannot tell out loud.
unneeded: Vec<String>What would not have to run at all, because something under it is kept. Empty without a real store, and that is not the same as “nothing”.
Implementations§
Source§impl Snapshot
impl Snapshot
Sourcepub fn names(&self) -> BTreeMap<String, String>
pub fn names(&self) -> BTreeMap<String, String>
What each node’s answer will be called, {node: key}.
Reading inside the opaque snapshot is the one thing this side does not
do — what a name is made of is the model’s business — and this is not
that: using a name as a name, to look it up in a store, is what the
model publishes it for. Decomposing a key to get something out of it
would be the other thing, and it would live in foreseen.
Nodes are missing and it is not an oversight: a .mapped() is named by
the content of its items, which nobody has before a run. That absence
reads cannot tell and never no data.
Sourcepub fn fingerprints(&self) -> BTreeMap<String, String>
pub fn fingerprints(&self) -> BTreeMap<String, String>
What version of the code each node had, {node: fingerprint}.
The side of attribution that survives what the other does not: a key is computed against the probing interpreter’s environment, so probing a three-month-old commit today gives keys matching nothing kept then, while the fingerprint was written beside the value by whoever ran.
Sourcepub fn drifted_from<'a>(
&'a self,
other: &'a Self,
) -> Vec<(&'a str, String, String)>
pub fn drifted_from<'a>( &'a self, other: &'a Self, ) -> Vec<(&'a str, String, String)>
What was built differently around the two of them: name, before, after.
Usually nothing, because two commits probed in one sitting share an interpreter. It is a cached probe from months ago against a fresh one that answers something here — which is the whole reason the environment is left out of what a snapshot is remembered under.