This project implements a hybrid log classification system, combining three complementary approaches to handle varying levels of complexity in log patterns. The classification methods ensure flexibility and effectiveness in processing predictable, complex, and poorly-labeled data patterns.
-
Regular Expression (Regex):
- Handles the most simplified and predictable patterns.
- Useful for patterns that are easily captured using predefined rules.
-
Sentence Transformer + Logistic Regression:
- Manages complex patterns when there is sufficient training data.
- Utilizes embeddings generated by Sentence Transformers and applies Logistic Regression as the classification layer.
-
LLM (Large Language Models):
- Used for handling complex patterns when sufficient labeled training data is not available.
- Provides a fallback or complementary approach to the other methods.
-
training/:- Contains the code for training models using Sentence Transformer and Logistic Regression.
- Includes the code for regex-based classification.
-
models/:- Stores the saved models, including Sentence Transformer embeddings and the Logistic Regression model.
-
resources/:- This folder contains resource files such as test CSV files, images, etc.
-
Root Directory:
- Contains the Streamlit server code (
server.py).
- Contains the Streamlit server code (
-
Install Dependencies: Make sure you have Python installed on your system. Install the required Python libraries by running the following command:
pip install -r requirements.txt
-
Run the Streamlit App: To start the interactive log classification app, use the following command:
streamlit run server.py
This will open a web interface in your browser where you can input log sources and log messages for classification.
Use the Streamlit web interface to classify logs one at a time:
- Enter the
source(e.g.,LegacyCRM,ModernCRM, etc.). - Enter the
log_messageyou want to classify. - Click the Classify Log button to see the predicted label for your log message.
The result will be displayed directly in the browser.
Made with ❤️ by Abhay
