new changes in the api
This commit is contained in:
13
app/main.py
13
app/main.py
@@ -83,19 +83,6 @@ async def lifespan(app: FastAPI):
|
||||
except Exception as e:
|
||||
logger.warning(f"[Analytics] DB check failed (non-fatal): {e}")
|
||||
|
||||
# Warm up the Thompson Sampling bandit (bootstraps from historical DB)
|
||||
try:
|
||||
from app.services.ml.strategy_bandit import get_bandit
|
||||
bandit = get_bandit()
|
||||
stats = bandit.get_stats()
|
||||
logger.info(
|
||||
f"[Bandit] RL strategy bandit ready — "
|
||||
f"{stats['context_count']} contexts, "
|
||||
f"{stats['total_updates']} historical updates loaded."
|
||||
)
|
||||
except Exception as e:
|
||||
logger.warning(f"[Bandit] Warm-up failed (non-fatal): {e}")
|
||||
|
||||
# Start the autonomous empirical-ETA sync agent (daemon thread).
|
||||
# It mirrors completed deliveries locally and rebuilds learned ETAs on a
|
||||
# schedule, so the request path never touches Postgres.
|
||||
|
||||
Reference in New Issue
Block a user