Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

fix(backtests): the pipeline LLM preflight is 5x optimistic and lets uncompletable runs through

Aperta
#522 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Start by reading _enforce_pipeline_llm_window and the credit_llm_reservations timestamps mentioned in the issue to understand how the current estimate compares with measured per-model wall time. Then inspect portfolio_manager.py for retries and _backtest_subprocess_timeout for the hosted-runtime budget approach. Done means the preflight accounts for measured latency and provider attempts, and does not approve runs that cannot fit the budget.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Prod run agent_20260922_202119_fc7bd724 (DJIA 30, 2026-09-07→09-18, deepseek/deepseek-v4-pro, pipeline + platform_credits) was killed at the 3600s limit having completed 47 of the 70 decision bars it needed. No results; the user was billed 81,130 micro-credits for 38 model calls.

_enforce_pipeline_llm_window approved it with what looked like a 2.9x margin:

estimated calls 70 (10 trading days x 7 bars x 1 pipeline step)
allowed 200 — (3600 - 600) // PIPELINE_SECONDS_PER_LLM_CALL
implied wall clock @ 15s/call 1050s
measured wall clock 76.7 s/call (decision-bar cycle: median 63.0s, mean 75.6s, n=46)
calls that fit in 3600s at the measured rate 47

The estimate is 5.1x optimistic, so the headroom is fictional — a run needing ~5370s passed a 3600s budget check.

Two separate errors in the model:

  1. The 15s constant was never fitted. It is documented as a calibrated estimate where under-estimating is the safe direction, which is correct for a refusal — but nothing has ever measured it, and it is plainly wrong for a reasoning model.
  2. It counts calls, not attempts. Every call on this run made 2 provider attempts (see the OpenRouter issue filed alongside this), and portfolio_manager.py retries an empty reply up to 4x on top of that.

credit_llm_reservations timestamps give per-model wall clock directly, so this is measurable from data already in prod rather than by guessing a bigger constant.

  • Re-fit the default from prod data, or make it per-model.
  • Account for attempts, not just calls.
  • Reconsider sizing the pipeline budget from the window, as _backtest_subprocess_timeout already does for the hosted runtime. #474 item 1 chose fixed-budget + preflight; the preflight is the half that turned out mis-calibrated.

Related: #474 (closed).


Filed from one diagnosis of the same prod run: #522 (why it timed out) · #523 (the dead primary provider) · #524 (why nothing is visible afterwards) · #525 (the refund log flood).

Lingua principale
Python
Stelle
767
Fork
156
Merge medio
22h 57m
PR unite (30g)
84

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Open-Finance-Lab/AgenticTrading

Tutte le issue di Open-Finance-Lab/AgenticTrading

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.