Skip to content

Commit a08454a

Browse files
authored
fix: rename 'bytes' -> 'bytes_transferred' in ci_generate_data.py to match train_model.py
1 parent 04fdaed commit a08454a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

ai-model/ci_generate_data.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212

1313
os.makedirs(DATA_DIR, exist_ok=True)
1414

15-
headers = ["timestamp", "source_ip", "destination_ip", "bytes", "protocol", "event_type", "details"]
15+
# Column names MUST match what train_model.py expects
16+
headers = ["timestamp", "source_ip", "destination_ip", "bytes_transferred", "protocol", "event_type", "details"]
1617

1718
protocols = ["TCP", "UDP", "ICMP", "HTTP", "HTTPS"]
1819
events = ["Normal", "Failed Login", "Port Scan", "Malware Detected", "File Access"]
@@ -36,7 +37,7 @@ def generate_row():
3637
datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
3738
src_ip,
3839
generate_ip(),
39-
random.randint(100, 50000),
40+
random.randint(100, 50000), # bytes_transferred
4041
random.choice(protocols),
4142
event_type,
4243
details_map.get(event_type, "Routine traffic"),

0 commit comments

Comments
 (0)