Correct SQL query for retrieving network traffic data
Fixes a critical SQL syntax error in `train_hybrid.py` preventing data loading by adjusting the `INTERVAL` calculation for the `timestamp` WHERE clause. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 7a657272-55ba-4a79-9a2e-f1ed9bc7a528 Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Event-Id: fd776d7a-7ad0-46a7-9500-792cb8944915 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/449cf7c4-c97a-45ae-8234-e5c5b8d6a84f/7a657272-55ba-4a79-9a2e-f1ed9bc7a528/XSkkaPM
This commit is contained in:
parent
b88377e2d5
commit
f6e222d473
@ -41,7 +41,7 @@ def train_on_real_traffic(db_config: dict, days: int = 7) -> pd.DataFrame:
|
|||||||
packet_length,
|
packet_length,
|
||||||
action
|
action
|
||||||
FROM network_logs
|
FROM network_logs
|
||||||
WHERE timestamp > NOW() - INTERVAL '%s days'
|
WHERE timestamp > NOW() - INTERVAL '1 day' * %s
|
||||||
ORDER BY timestamp DESC
|
ORDER BY timestamp DESC
|
||||||
LIMIT 1000000
|
LIMIT 1000000
|
||||||
"""
|
"""
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user