feat: Add parameters for Kubeflow pipeline engine (WIP) (#107)

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
Michele Dolfi
2025-04-23 14:59:53 +02:00
committed by GitHub
parent 40bb21d347
commit 26bef5bec0
21 changed files with 3727 additions and 3078 deletions

View File

@@ -1,11 +1,21 @@
from abc import ABC, abstractmethod
from typing import Optional
from docling_serve.datamodel.requests import ConvertDocumentsRequest
from docling_serve.datamodel.task import Task
class OrchestratorError(Exception):
pass
class TaskNotFoundError(OrchestratorError):
pass
class BaseOrchestrator(ABC):
@abstractmethod
async def enqueue(self, task) -> Task:
async def enqueue(self, request: ConvertDocumentsRequest) -> Task:
pass
@abstractmethod
@@ -13,9 +23,17 @@ class BaseOrchestrator(ABC):
pass
@abstractmethod
async def task_status(self, task_id: str) -> Task:
async def get_queue_position(self, task_id: str) -> Optional[int]:
pass
@abstractmethod
async def task_status(self, task_id: str, wait: float = 0.0) -> Task:
pass
@abstractmethod
async def task_result(self, task_id: str):
pass
@abstractmethod
async def process_queue(self):
pass