plugins.plugin.TesseractPlugin
plugins.plugin.TesseractPlugin(spec)A cadjoint kind, filled by a Tesseract over one of the transports.
The client is opened on first use and kept warm for the life of the object: a local plugin imports its tesseract_api.py once, a container plugin spawns its container once (torn down by :meth:close), a remote plugin holds one session.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| spec | PluginSpec | Which Tesseract.from_* call stands behind this plugin. |
required |
Attributes
| Name | Description |
|---|---|
| capabilities | See :class:Capabilities. |
| client | Alias of :attr:tesseract for callers that speak of the client. |
| inputs | Declared apply inputs — the runtime’s own property models. |
| outputs | Declared apply outputs — the runtime’s own property models. |
| schema | The runtime’s own schema sections, fetched once and cached. |
| served_version | The version the running instance advertises ("unknown" if none). |
| tesseract | The underlying tesseract_core.Tesseract (opened on first use). |
| version | What the instance reports, else the version its package declares. |
Methods
| Name | Description |
|---|---|
| apply | Tesseract.apply, callable with a mapping or with keywords. |
| as_jax | tesseract_jax.apply_tesseract bound to this plugin’s client. |
| close | Release the instance, tearing down a container this object spawned. |
| probe | Check the instance is up and is the component the spec expects. |
| schema_hash | sha256: of the schema the runtime publishes, canonicalized. |
| vjp | Tesseract.vector_jacobian_product, with list-coerced names. |
apply
plugins.plugin.TesseractPlugin.apply(inputs=None, **kwargs)Tesseract.apply, callable with a mapping or with keywords.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| inputs | Mapping[str, Any] | None | The payload, or None to build it from kwargs. |
None |
| **kwargs | Any | Payload entries, when inputs is not given. |
{} |
Returns
| Name | Type | Description |
|---|---|---|
| dict[str, Any] | The outputs the component declares. |
as_jax
plugins.plugin.TesseractPlugin.as_jax()tesseract_jax.apply_tesseract bound to this plugin’s client.
That function is the JAX primitive — it carries the custom_vjp dispatching to the component’s vector_jacobian_product under jax.grad. Nothing is re-implemented here; this only supplies the client, so a caller composing a chain never handles one.
Returns
| Name | Type | Description |
|---|---|---|
| Callable[[Mapping[str, Any]], dict[str, Any]] | inputs -> outputs. |
Raises
| Name | Type | Description |
|---|---|---|
| ImportError | Without the tesseract extra. |
close
plugins.plugin.TesseractPlugin.close()Release the instance, tearing down a container this object spawned.
probe
plugins.plugin.TesseractPlugin.probe(strict=True)Check the instance is up and is the component the spec expects.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| strict | bool | Raise on a schema-hash or version mismatch (the default); False reports it and leaves the judgement to the caller. |
True |
Returns
| Name | Type | Description |
|---|---|---|
| The | PluginProbe | class:PluginProbe. |
Raises
| Name | Type | Description |
|---|---|---|
| PluginMismatch | When strict and the served schema hash — or the version, when both sides state one — differs from the spec’s. |
|
| RuntimeError | When the instance cannot be reached. |
schema_hash
plugins.plugin.TesseractPlugin.schema_hash()sha256: of the schema the runtime publishes, canonicalized.
A hash of the runtime’s own document, not of a cadjoint restatement of it — and measured identical across the local and remote forms of one package (tests/plugins/test_transport.py), which is what makes it a usable staleness check for a cluster.
vjp
plugins.plugin.TesseractPlugin.vjp(
inputs,
vjp_inputs,
vjp_outputs,
cotangent_vector,
)Tesseract.vector_jacobian_product, with list-coerced names.