Spaces:
Sleeping
Sleeping
Daniel Alnawaz commited on
updated status intervals
Browse files- adaptive_bot.py +12 -8
adaptive_bot.py
CHANGED
|
@@ -657,6 +657,7 @@ class AdaptiveHyperliquidBot:
|
|
| 657 |
self._http_server: Optional[ThreadingHTTPServer] = None
|
| 658 |
self._entry_features: Dict[Tuple[str, int], List[float]] = {}
|
| 659 |
self._last_ml_report_ts: float = 0.0
|
|
|
|
| 660 |
self._advisor_stats: Dict[str, int] = {
|
| 661 |
"requests": 0,
|
| 662 |
"errors": 0,
|
|
@@ -1419,15 +1420,18 @@ class AdaptiveHyperliquidBot:
|
|
| 1419 |
self.learning.save()
|
| 1420 |
self.write_report()
|
| 1421 |
|
|
|
|
| 1422 |
m = self.learning.global_metrics()
|
| 1423 |
-
|
| 1424 |
-
|
| 1425 |
-
|
| 1426 |
-
|
| 1427 |
-
|
| 1428 |
-
|
| 1429 |
-
|
| 1430 |
-
|
|
|
|
|
|
|
| 1431 |
self._maybe_notify_live_readiness()
|
| 1432 |
self._maybe_prepare_live()
|
| 1433 |
self._maybe_send_daily_summary()
|
|
|
|
| 657 |
self._http_server: Optional[ThreadingHTTPServer] = None
|
| 658 |
self._entry_features: Dict[Tuple[str, int], List[float]] = {}
|
| 659 |
self._last_ml_report_ts: float = 0.0
|
| 660 |
+
self._last_stats_log_ts: float = 0.0
|
| 661 |
self._advisor_stats: Dict[str, int] = {
|
| 662 |
"requests": 0,
|
| 663 |
"errors": 0,
|
|
|
|
| 1420 |
self.learning.save()
|
| 1421 |
self.write_report()
|
| 1422 |
|
| 1423 |
+
now_ts = time.time()
|
| 1424 |
m = self.learning.global_metrics()
|
| 1425 |
+
if now_ts - self._last_stats_log_ts >= 300:
|
| 1426 |
+
logger.info(
|
| 1427 |
+
"Stats trades=%d win_rate=%.2f%% pf=%.2f paper_equity=%.2f profitable_gate=%s",
|
| 1428 |
+
int(m["trades"]),
|
| 1429 |
+
m["win_rate"] * 100.0,
|
| 1430 |
+
m["profit_factor"],
|
| 1431 |
+
self.paper.equity,
|
| 1432 |
+
self.learning.consistently_profitable(),
|
| 1433 |
+
)
|
| 1434 |
+
self._last_stats_log_ts = now_ts
|
| 1435 |
self._maybe_notify_live_readiness()
|
| 1436 |
self._maybe_prepare_live()
|
| 1437 |
self._maybe_send_daily_summary()
|