- extract TaskTiming + MetricsCollector out of Task/TaskManager - unify prefill/decode timing into single record() context manager - expose avg_ttft_ms, avg_decode_tps, avg_e2e_latency_ms via /stats
34 lines
763 B
Python
34 lines
763 B
Python
"""Inference core: cache, executor, scheduler, task management."""
|
|
|
|
from astrai.inference.core.cache import (
|
|
Allocator,
|
|
KVCache,
|
|
KVStorage,
|
|
PagePool,
|
|
RadixCache,
|
|
ReqToTokenPool,
|
|
page_hash,
|
|
)
|
|
from astrai.inference.core.executor import Executor
|
|
from astrai.inference.core.metrics import MetricsCollector, TaskTiming
|
|
from astrai.inference.core.scheduler import InferenceScheduler
|
|
from astrai.inference.core.task import STOP, Task, TaskManager, TaskStatus
|
|
|
|
__all__ = [
|
|
"Allocator",
|
|
"KVCache",
|
|
"KVStorage",
|
|
"PagePool",
|
|
"RadixCache",
|
|
"ReqToTokenPool",
|
|
"page_hash",
|
|
"Executor",
|
|
"InferenceScheduler",
|
|
"MetricsCollector",
|
|
"TaskTiming",
|
|
"STOP",
|
|
"Task",
|
|
"TaskManager",
|
|
"TaskStatus",
|
|
]
|