Skip to content

Commit 380fa16

Browse files
committed
readme etc.
1 parent 660136a commit 380fa16

File tree

4 files changed

+30
-21
lines changed

4 files changed

+30
-21
lines changed

Diff for: README.md

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ This project implements a hybrid log classification system, combining three comp
1919
- Used for handling complex patterns when sufficient labeled training data is not available.
2020
- Provides a fallback or complementary approach to the other methods.
2121

22+
![](resources\arch.png)
23+
2224
---
2325

2426
## Folder Structure

Diff for: requirements.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
fastapi==0.115.6
2+
python-dotenv==1.0.1
3+
groq==0.9.0
4+
sentence-transformers==3.3.1
5+
joblib==1.3.2
6+
pandas==2.0.2
7+
scikit-learn==1.6.0

Diff for: resources/arch.png

28.6 KB
Loading

Diff for: training/log_classification.ipynb

+21-21
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
"metadata": {
1313
"collapsed": true,
1414
"ExecuteTime": {
15-
"end_time": "2025-01-15T20:27:53.349036Z",
16-
"start_time": "2025-01-15T20:27:53.317874Z"
15+
"end_time": "2025-01-18T21:42:43.965893Z",
16+
"start_time": "2025-01-18T21:42:43.144021Z"
1717
}
1818
},
1919
"source": [
2020
"import pandas as pd\n",
2121
"\n",
22-
"df = pd.read_csv(\"synthetic_logs.csv\")\n",
22+
"df = pd.read_csv(\"dataset/synthetic_logs.csv\")\n",
2323
"df.head()"
2424
],
2525
"outputs": [
@@ -33,19 +33,19 @@
3333
"3 2025-07-12 00:24:16 ModernHR \n",
3434
"4 2025-06-02 18:25:23 BillingSystem \n",
3535
"\n",
36-
" log_message \\\n",
37-
"0 nova.osapi_compute.wsgi.server [req-b9718cd8-f65e-49cc-8349-6cf7122af137 113d3a99c3da401fbd62cc2caa5b96d2 54fadb412c4e40cdbaed9335e4c35a9e - - -] 10.11.10.1 \"GET /v2/54fadb412c4e40cdbaed9335e4c35a9e/servers/detail HTTP/1.1\" status: 200 len: 1893 time: 0.2675118 \n",
38-
"1 Email service experiencing issues with sending \n",
39-
"2 Unauthorized access to data was attempted \n",
40-
"3 nova.osapi_compute.wsgi.server [req-4895c258-b2f8-488f-a2a3-4fae63982e48 113d3a99c3da401fbd62cc2caa5b96d2 54fadb412c4e40cdbaed9335e4c35a9e - - -] 10.11.10.1 \"GET /v2/54fadb412c4e40cdbaed9335e4c35a9e/servers/detail HTTP/1.1\" HTTP status code - 200 len: 211 time: 0.0968180 \n",
41-
"4 nova.osapi_compute.wsgi.server [req-ee8bc8ba-9265-4280-9215-dbe000a41209 113d3a99c3da401fbd62cc2caa5b96d2 54fadb412c4e40cdbaed9335e4c35a9e - - -] 10.11.10.1 \"GET /v2/54fadb412c4e40cdbaed9335e4c35a9e/servers/detail HTTP/1.1\" RCODE 200 len: 1874 time: 0.2280791 \n",
36+
" log_message target_label \\\n",
37+
"0 nova.osapi_compute.wsgi.server [req-b9718cd8-f... HTTP Status \n",
38+
"1 Email service experiencing issues with sending Critical Error \n",
39+
"2 Unauthorized access to data was attempted Security Alert \n",
40+
"3 nova.osapi_compute.wsgi.server [req-4895c258-b... HTTP Status \n",
41+
"4 nova.osapi_compute.wsgi.server [req-ee8bc8ba-9... HTTP Status \n",
4242
"\n",
43-
" target_label complexity \n",
44-
"0 HTTP Status bert \n",
45-
"1 Critical Error bert \n",
46-
"2 Security Alert bert \n",
47-
"3 HTTP Status bert \n",
48-
"4 HTTP Status bert "
43+
" complexity \n",
44+
"0 bert \n",
45+
"1 bert \n",
46+
"2 bert \n",
47+
"3 bert \n",
48+
"4 bert "
4949
],
5050
"text/html": [
5151
"<div>\n",
@@ -78,7 +78,7 @@
7878
" <th>0</th>\n",
7979
" <td>2025-06-27 07:20:25</td>\n",
8080
" <td>ModernCRM</td>\n",
81-
" <td>nova.osapi_compute.wsgi.server [req-b9718cd8-f65e-49cc-8349-6cf7122af137 113d3a99c3da401fbd62cc2caa5b96d2 54fadb412c4e40cdbaed9335e4c35a9e - - -] 10.11.10.1 \"GET /v2/54fadb412c4e40cdbaed9335e4c35a9e/servers/detail HTTP/1.1\" status: 200 len: 1893 time: 0.2675118</td>\n",
81+
" <td>nova.osapi_compute.wsgi.server [req-b9718cd8-f...</td>\n",
8282
" <td>HTTP Status</td>\n",
8383
" <td>bert</td>\n",
8484
" </tr>\n",
@@ -102,15 +102,15 @@
102102
" <th>3</th>\n",
103103
" <td>2025-07-12 00:24:16</td>\n",
104104
" <td>ModernHR</td>\n",
105-
" <td>nova.osapi_compute.wsgi.server [req-4895c258-b2f8-488f-a2a3-4fae63982e48 113d3a99c3da401fbd62cc2caa5b96d2 54fadb412c4e40cdbaed9335e4c35a9e - - -] 10.11.10.1 \"GET /v2/54fadb412c4e40cdbaed9335e4c35a9e/servers/detail HTTP/1.1\" HTTP status code - 200 len: 211 time: 0.0968180</td>\n",
105+
" <td>nova.osapi_compute.wsgi.server [req-4895c258-b...</td>\n",
106106
" <td>HTTP Status</td>\n",
107107
" <td>bert</td>\n",
108108
" </tr>\n",
109109
" <tr>\n",
110110
" <th>4</th>\n",
111111
" <td>2025-06-02 18:25:23</td>\n",
112112
" <td>BillingSystem</td>\n",
113-
" <td>nova.osapi_compute.wsgi.server [req-ee8bc8ba-9265-4280-9215-dbe000a41209 113d3a99c3da401fbd62cc2caa5b96d2 54fadb412c4e40cdbaed9335e4c35a9e - - -] 10.11.10.1 \"GET /v2/54fadb412c4e40cdbaed9335e4c35a9e/servers/detail HTTP/1.1\" RCODE 200 len: 1874 time: 0.2280791</td>\n",
113+
" <td>nova.osapi_compute.wsgi.server [req-ee8bc8ba-9...</td>\n",
114114
" <td>HTTP Status</td>\n",
115115
" <td>bert</td>\n",
116116
" </tr>\n",
@@ -119,12 +119,12 @@
119119
"</div>"
120120
]
121121
},
122-
"execution_count": 269,
122+
"execution_count": 1,
123123
"metadata": {},
124124
"output_type": "execute_result"
125125
}
126126
],
127-
"execution_count": 269
127+
"execution_count": 1
128128
},
129129
{
130130
"metadata": {
@@ -2257,7 +2257,7 @@
22572257
"cell_type": "code",
22582258
"source": [
22592259
"import joblib\n",
2260-
"joblib.dump(clf, 'models/log_classifier.joblib')\n"
2260+
"joblib.dump(clf, '../models/log_classifier.joblib')\n"
22612261
],
22622262
"id": "1317f9b2de813a32",
22632263
"outputs": [

0 commit comments

Comments
 (0)