InferenceMode
/invocations mode field and the REST endpoint keys), so this enum is the single source of truth for mode identifiers without changing the wire contract. Because it is a StrEnum, members compare, hash, and serialize exactly like their string value, so they are drop-in wherever a mode string was used.
coerce_inference_mode
InferenceMode.
Accepts an InferenceMode member unchanged, a canonical on-wire string (for example "prediction"), or a legacy short spelling (for example "predict"). A legacy spelling is translated to its canonical member and emits a DeprecationWarning, so the enum is the single source of truth while pre-enum callers keep working.
The mode or stage to normalize.
InferenceMode member.
Raises:
BioptimusValueError- Ifvalueis neither a member, a canonical value, nor a known legacy spelling.
ModelRequest
image_data- Base64-encoded tile image (PNG).bulk_rna- Optional bulk RNA counts vector.slide_name- Stem of the source slide filename.x- Tile x-coordinate in the slide.y- Tile y-coordinate in the slide.width- Tile width in pixels.height- Tile height in pixels.tissue_ratio- Fraction of tissue in the tile.patch_idx- Index of this tile in the extraction plan.
image
ModelResponse
output- Model output vector for this tile.slide_name- Stem of the source slide filename.x- Tile x-coordinate in the slide.y- Tile y-coordinate in the slide.width- Tile width in pixels.height- Tile height in pixels.tissue_ratio- Fraction of tissue in the tile.patch_idx- Index of this tile in the extraction plan.resolution- Extraction resolution (MPP) if available.embedding- The tile embedding, returned alongsideoutputonly for theprediction_with_embeddingmode (both come from the same forward pass).Nonefor the single-output modes.
SageMakerRequest
/invocations endpoint.
Adds a model_name field so the server can dispatch to the correct model and a mode field to select the scheduler (see InferenceMode).
