feat(): prediction pipeline

This commit is contained in:
gitgernit
2025-11-23 04:11:52 +03:00
parent 2e6214a5ec
commit d1c7641698
25 changed files with 224 additions and 244 deletions
@@ -2,7 +2,7 @@ from collections.abc import AsyncIterable
from aioboto3.session import Session
from dishka import Provider, Scope, provide
from httpx import AsyncClient
from httpx import AsyncClient, Timeout
from sqlalchemy.ext.asyncio import AsyncEngine, AsyncSession, create_async_engine
from template_project.adapters.ml_api_gateway import MlApiGateway
@@ -40,5 +40,6 @@ class ConnectionProvider(Provider):
@provide(scope=Scope.APP)
async def ml_api_gateway(self, config: MlApiConfiguration) -> AsyncIterable[MlApiGateway]:
async with AsyncClient(base_url=config.url) as client:
timeout = Timeout(30.0, read=30.0)
async with AsyncClient(base_url=config.url, timeout=timeout) as client:
yield MlApiGateway(client)