Reduce Ollama load: 10min cycle, fast-gate skip for confident qwen, 60s scalp, 75s stagger per bot
This commit is contained in:
10
bot.py
10
bot.py
@@ -348,7 +348,13 @@ def llm_vote(cfg, price, mom, mom_score, conn):
|
||||
v1 = fast_v if fast_v in ("UP","DOWN","SKIP") else "SKIP"
|
||||
c1 = fast_c if fast_v in ("UP","DOWN","SKIP") else 0.50
|
||||
|
||||
# Model 2: ornith deep verify (GamingPC RTX 3070)
|
||||
# Fast-gate skip: if qwen is confident enough, skip ornith entirely
|
||||
fast_gate_conf = cfg.get("fast_gate_conf", 0.65)
|
||||
if v1 in ("UP","DOWN") and c1 >= fast_gate_conf:
|
||||
LOG.info(f"[fast-gate {v1} {c1:.2f}] skipping ornith — qwen confident")
|
||||
return v1, c1, f"[fast-gate {v1} {c1:.2f}] {fast_w[:80]}"
|
||||
|
||||
# Model 2: ornith deep verify (GamingPC RTX 3070) — only on borderline/uncertain
|
||||
try:
|
||||
r2 = requests.post("http://10.30.20.186:11434/api/generate",
|
||||
json={"model": "ornith:latest", "prompt": prompt, "stream": False, "think": False, "keep_alive": "10m",
|
||||
@@ -806,7 +812,7 @@ def run():
|
||||
LOG.info(f"skip {ticker}: {why}")
|
||||
except Exception as e:
|
||||
log_event(conn, "error", f"loop error: {e}")
|
||||
time.sleep(15) # scalp loop: watch constantly
|
||||
time.sleep(cfg.get("scalp_interval_sec", 60)) # configurable scalp loop
|
||||
|
||||
if __name__ == "__main__":
|
||||
run()
|
||||
|
||||
Reference in New Issue
Block a user