torchsky.map.evidence¶
Experimental surface
These APIs are under active development. Names, defaults, and result objects may change between minor releases; pin a version if you depend on them in production.
Declared fixed-model dependencies, without tensor copies or content hashes.
Guides: likelihoods
This reference is generated from the package source. Names are grouped by
the module that defines them; import every name from the public
namespace torchsky.map.evidence unless the group text says otherwise.
Top-level namespace¶
Declared fixed-model dependencies, without tensor copies or content hashes.
EvidenceSnapshot
dataclass
¶
EvidenceSnapshot(
_tensors: tuple[tuple[str, Tensor, int | None], ...],
_revision: Callable[[], object] | None = None,
_token: object = None,
_parents: tuple[EvidenceSnapshot, ...] = (),
_plans: tuple[
tuple[str, object, PlanFingerprint], ...
] = (),
)
A snapshot of caller-declared tensors and an optional revision getter.
Capture response matrices, precision/module parameters, calibration and support tensors explicitly. The revision getter must return an immutable scalar/tuple token and change whenever non-tensor state, tensor bindings, gauge or model conventions change. Identifiers alone do not verify physics. Dependencies retain tensors without detaching, copying or scanning them.
Torch mutation versions detect ordinary in-place writes (including shared
views); NumPy and .data alias writes may bypass them. Inference tensors
have no version counter and require a caller-maintained explicit revision.
Arbitrary callback closures and module parameter replacement are not
inspected. Rebuild factors, statistics and queries after a change.
_parents
class-attribute
instance-attribute
¶
_parents: tuple[EvidenceSnapshot, ...] = field(
default=(), repr=False
)
_plans
class-attribute
instance-attribute
¶
_plans: tuple[tuple[str, object, PlanFingerprint], ...] = (
field(default=(), repr=False)
)
_revision
class-attribute
instance-attribute
¶
_revision: Callable[[], object] | None = field(
default=None, repr=False
)
_tensors
class-attribute
instance-attribute
¶
_tensors: tuple[tuple[str, Tensor, int | None], ...] = (
field(repr=False)
)
capture
classmethod
¶
capture(
tensors: Mapping[str, Tensor] | None = None,
*,
revision: Callable[[], object] | None = None,
plans: Mapping[str, object] | None = None,
) -> EvidenceSnapshot
with_plans ¶
with_plans(plans: Mapping[str, object]) -> EvidenceSnapshot
Extend an unchanged snapshot with immutable graph/plan lineage.
with_tensors ¶
with_tensors(
tensors: Mapping[str, Tensor],
) -> EvidenceSnapshot
Extend an unchanged snapshot, retaining its explicit revision policy.