app.predict.client

HTTP client for the ML service (ml/src/inference_service.py).

Classes

MlClient(base_url, *[, timeout_s, transport])

Exceptions

MlUnavailable

The ML service couldn't be reached or answered with an error.

class app.predict.client.MlClient(base_url: str, *, timeout_s: float = 10.0, transport: httpx.AsyncBaseTransport | None = None)[исходный код]

Базовые классы: object

__init__(base_url: str, *, timeout_s: float = 10.0, transport: httpx.AsyncBaseTransport | None = None) → None[исходный код]
async aclose() → None[исходный код]
async health() → dict[исходный код]
async metrics() → dict[исходный код]
async predict_batch(requests: list[dict]) → list[dict][исходный код]
async whatif(request: dict) → dict[исходный код]
exception app.predict.client.MlUnavailable[исходный код]

Базовые классы: Exception

The ML service couldn’t be reached or answered with an error.