EndpointModel that pairs a ModelSpec with any Client implementation (HTTP, AWS SageMaker, GCP, Azure, …). This eliminates the need for per-backend model subclasses.
EndpointModel
ModelSpec (what the model expects and produces) with a Client (how to reach it).
Supports both synchronous (predict / embed) and asynchronous (predict_async / embed_async) dispatch.
Model specification describing input requirements and output shape.
A configured
Client instance (e.g. HTTPClient, AWSClient).Optional ordered Ensembl IDs expected as bulk RNA input (M-Optimus ).
Optional ordered Ensembl IDs of predicted output genes (M-Optimus ).
model_spec
input_gene_names
output_gene_names
predict
Tile request payload to send.
embed
Tile request payload to send.
predict_with_embedding
output) and the tile embedding (embedding) from a single forward pass, so callers needing both avoid a second inference.
Tile request payload to send.
embedding populated alongside
output.
predict_async
Tile request payload to send.
An
aiohttp.ClientSession for connection pooling.embed_async
Tile request payload to send.
An
aiohttp.ClientSession for connection pooling.predict_with_embedding_async
Tile request payload to send.
An
aiohttp.ClientSession for connection pooling.embedding populated alongside
output.
__call__
predict.
