refactor: centralize logging in astrai.logging, replace ASTRAI_TIMED with log level

- move setup_logging to astrai/logging.py
- timed() now uses logger.isEnabledFor(DEBUG) instead of separate env var
- enable ASTR_LOG_LEVEL=DEBUG to see per-step timing logs
- call setup_logging() in stream_chat.py
This commit is contained in:
2026-08-08 12:39:27 +08:00
parent cb60713a72
commit cbc584470d
9 changed files with 35 additions and 43 deletions
-2
View File
@@ -5,7 +5,6 @@ from typing import Optional, Union
import click
import torch
from astrai import setup_logging
from astrai.config import BaseModelConfig, ConfigFactory
from astrai.extension import ATTN_BACKEND, AttentionBackendFactory, attn_backend
from astrai.inference.core.cache import PagePool
@@ -478,5 +477,4 @@ def benchmark_command(
if __name__ == "__main__":
setup_logging()
benchmark_command()