remote, aws, local, or huggingface), and validates the response against the model’s output contract.
Unlike the probes in bioptimus.observability.probes, this module performs real work: it constructs a client, opens a connection or loads a checkpoint, and issues a billable inference request. It is therefore never run implicitly as part of a diagnostic snapshot — the caller asks for it explicitly, through verify_endpoint, the bioptimus verify CLI subcommand, or the verify argument of build_support_bundle.
Like the probes, the entry point is fail-safe by default: every failure is captured as a Check carrying its ErrorCode and remediation, so a broken deployment still yields a complete, shareable report instead of a traceback. Pass raise_on_failure=True to turn the first failure into a raised BioptimusRuntimeError instead.
Example:
Check
name- Stable slug identifying the step, for example"embedding_request".passed- Whether the step succeeded. A skipped step is reported as passed so that a model which does not offer a mode cannot fail the run.duration_ms- Wall-clock duration of the step in milliseconds.skipped- Whether the step did not run (for example a mode the model does not expose).detailcarries the reason.detail- Human-readable outcome or failure detail.error_code- TheErrorCodevalue for a failed step, otherwiseNone.remediation- Actionable hint for a failed step, otherwiseNone.context- Structured fields describing the step, for example the observed and expected output lengths.
HealthReport
schema_version- Version of this report’s shape.captured_at- UTC ISO-8601 timestamp of the run.model- Model name that was verified, for example"h1".backend- Backend that was verified, for example"aws".target- Human-readable description of what was reached (a base URL, a SageMaker endpoint name, a checkpoint path, or a Hub repo), orNonewhen the client could not be built.modes- Inference modes that were attempted.ok- Whether every non-skipped check passed.checks- The checks in execution order.
failures
to_dict
json.dumps, for inclusion in a
support bundle, or for printing from the CLI.
summary
"h1 on remote: ok (3 checks)" or
"h1 on remote: FAILED — embedding_request [BIO-NET-001]".
synthetic_tile
seed and size always produce byte-identical pixels, so repeated runs are directly comparable.
Tile
(width, height) in pixels.Seed for the noise component.
PIL.Image.Image of the requested size.
synthetic_expression
Number of genes the model expects, in the model’s gene order.
num_genes identical, non-zero expression values.
verify_endpoint
backend, fetches model metadata, sends one synthetic tile per requested inference mode, and validates each response against the model’s declared output contract (length, finiteness, and echoed tile metadata). Every step is recorded as a Check; nothing raises unless raise_on_failure is set.
Model name, for example
"h1" or "m-optimus". Must match a registered SDK model config.Backend to verify:
"remote", "aws", "local", or "huggingface".Inference modes to exercise.
"auto" (the default) resolves the modes the model actually exposes — embedding only for the plain backbones, prediction only for tissue-seg, both for m-optimus — and narrows to embedding for the huggingface backend, which has no prediction head. Pass "embedding", "prediction", or a sequence of both to force a specific set.Tile
(width, height) to send. Defaults to the size in the model’s tile spec, which is what a correctly configured endpoint expects; override only to probe how an endpoint handles another size.Seed for the synthetic tile, so runs are reproducible.
When
True, raises instead of returning a report whose ok is False.Forwarded verbatim to
Backbone — for example base_url for remote, endpoint_name and region_name for aws, model_dir or checkpoint for local, and device or precision for huggingface.HealthReport describing every check that ran.
Raises:
BioptimusValueError- Whenmodesnames a mode that cannot be verified, or whentile_sizeis not a pair of positive integers. Both are raised up front, before any client is built.BioptimusRuntimeError- Whenraise_on_failureisTrueand any check failed. The error carries the first failure’s code and the full report in itscontext.

